Add settings to select which field groups are exported to KiCad - #1533
Open
lukas-runge wants to merge 2 commits into
Open
Add settings to select which field groups are exported to KiCad#1533lukas-runge wants to merge 2 commits into
lukas-runge wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1533 +/- ##
=========================================
Coverage 62.39% 62.40%
- Complexity 9879 9895 +16
=========================================
Files 736 736
Lines 31779 31798 +19
=========================================
+ Hits 19829 19842 +13
- Misses 11950 11956 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The KiCad category parts listing is cached and only invalidated by entity changes (parts, categories, footprints). Settings that change the exported fields (datasheet as PDF, default parameter/orderdetail visibility) did not invalidate it, so KiCad kept receiving the old listing until any part was edited. Include a fingerprint of these settings in the cache key, so a settings change results in a fresh listing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
KiCad reports every difference between a placed symbol and its library entry as a "library symbol mismatch" in the ERC. Since Part-DB exports stock, storage locations, supplier part numbers, KiCost fields, part info and tags as symbol fields, every stock booking, supplier edit or tag change in Part-DB triggers ERC warnings in all schematics using the part. This adds five settings (also configurable via env, EnvVarMode::OVERWRITE) to the KiCad integration settings that allow disabling these field groups: - EDA_KICAD_EXPORT_STOCK_FIELDS: Stock, Storage Location - EDA_KICAD_EXPORT_SUPPLIER_FIELDS: <Supplier> SPN - EDA_KICAD_EXPORT_KICOST_FIELDS: manf, manf#, <supplier># - EDA_KICAD_EXPORT_PART_INFO_FIELDS: Category, Manufacturing Status, Mass, Part-DB IPN/Footprint/Unit/Custom state - EDA_KICAD_EXPORT_TAGS_AS_KEYWORDS: symbol keywords All settings default to true, so the exported fields do not change for existing installations. The new settings are part of the category listing cache fingerprint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lukas-runge
force-pushed
the
feature/kicad-export-field-switches
branch
from
September 9, 2026 16:05
98b7b6a to
87c2a14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
🤖 Claude Fable 5.1 opening this PR on behalf of @lukas-runge
Important
Stacked on #1534 (cache fingerprint fix). Only the second commit belongs to this PR.
Motivation
KiCad compares the fields of every placed symbol with the HTTP library and reports each difference as a "library symbol mismatch" in the ERC. Part-DB exports stock, storage locations, supplier part numbers, KiCost fields, part info and tags as symbol fields, so every stock booking, supplier edit or tag change in Part-DB produces ERC warnings in all schematics that use the part. In a workshop with regular stock movements this makes the ERC effectively unusable.
Related: #536 asked for a configurable field selection (in the other direction, more fields), #1502 discusses which field changes the ERC picks up.
Changes
Five new settings in "KiCAD integration" (also via env,
EnvVarMode::OVERWRITE):EDA_KICAD_EXPORT_STOCK_FIELDSStock,Storage LocationEDA_KICAD_EXPORT_SUPPLIER_FIELDS<Supplier> SPNEDA_KICAD_EXPORT_KICOST_FIELDSmanf,manf#,<supplier>#EDA_KICAD_EXPORT_PART_INFO_FIELDSCategory,Manufacturing Status,Mass,Part-DB IPN,Part-DB Footprint,Part-DB Unit,Part-DB Custom stateEDA_KICAD_EXPORT_TAGS_AS_KEYWORDSAll default to
true, so existing installations export exactly the same fields as before. Symbol, footprint, reference, value, datasheet, description, Manufacturer, MPN, Part-DB ID and Part-DB URL are always exported.Tests
KiCadHelperTestcovering defaults, each switch, the independence of the supplier and KiCost switches, and that the new settings are part of the listing cache fingerprint from Fix stale KiCad category listing after EDA settings change #1534.docs/usage/eda_integration.md.Running in production on a 2.17.0 instance since the 2.16 line.