kinparse icon indicating copy to clipboard operation
kinparse copied to clipboard

Support for KiCad 9?

Open DanielPenning opened this issue 8 months ago • 2 comments

This is a parser for KiCad V5 through V8 schematic netlist files that are output by EESCHEMA.

Are there plans to update for KiCad V9? I just tried to run it on a V9 project and - as expected - parsing fails.

Thanks for maintaining this library. We use it for automating some of our hardware-related tasks and it would be very nice to use it with the newest KiCad version.

DanielPenning avatar May 30 '25 09:05 DanielPenning

There is nobody working on updating this to KiCad 9. If someone did, I would accept the PR.

The main problem with kinparse is that it is brittle: any change to the netlist format and it breaks. So fixing it for KiCad 9 only means you'll later have to fix it for KiCad 10. And I've found ascertaining the exact cause of a parsing error is challenging with pyparsing's error messages.

Since you aren't concerned with parsing the netlist for correctness but just need to extract some information, maybe simp_sexp will work for you. It has search capabilities that allow it to find and extract information from S-expression files. You would have to write some code to get what you need from a netlist file and then work with it from there. I'm not sure if that is more or less work than fixing kinparse.

devbisme avatar Jun 19 '25 16:06 devbisme

Hi @devbisme Thanks for getting back to me! Upon further analysis it showed that the netlist format changes are minimal, in fact I discovered only one added element. So I was in luck, the error messages are indeed quite "challenging" ;) Please consider my pull request for it: https://github.com/devbisme/kinparse/pull/21

DanielPenning avatar Jun 25 '25 07:06 DanielPenning