Netlist exporter regression in 8.0.2: some nets might not be exported
Description
The netlist exporter in 8.0.2 behaves differently than 8.0.1, and sometimes generates netlists with missing nets. This doesn't seem to happen systematically (= netlist exporter is not totally broken), and might be related to complex hierarchical schematics and/or when a netlist is exported for some subsheet only instead of the top-level schematic.
Here's an example vim diff between two netlists generated from the same subsheet file: 8.0.1 is on the left, and 8.0.2 is on the right
The 8.0.1 netlist on the left contains a net with code "23" that is not present in the 8.0.2 netlist on the right. Here's the problematic net highlighted visually in the actual schematic:
As you can see, it's just a normal unnamed net that is necessary in the netlist for the circuit to make sense.
I git bisected this issue locally and looks like 55c864ec is the first bad commit. I also double-checked that the latest 8.0 branch version still has the issue.
Steps to reproduce
- Unzip the following project: subsheet_netlist_export_bug.zip
- Export a subsheet netlist using the following command or equivalent:
kicad-cli sch export netlist bank1_register.kicad_sch
- Look at the generated
bank1_register.net
file and observe net "23" is not there if a KiCad version built from the mentioned bad commit or later is used
KiCad Version
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 8.0.2-8.0.2-0~ubuntu22.04.1, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.11.1
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.17
Platform: Pop!_OS 22.04 LTS, 64 bit, Little endian, wxGTK, X11, pop, x11
Build Info:
Date: Apr 28 2024 21:38:46
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.6.3
Curl: 7.81.0
ngspice: 42
Compiler: GCC 11.4.0 with C++ ABI 1016
Build settings: