* Warn on legacy Component() inputs
Emit a deprecated.component_property warning whenever Component() is
called with a legacy properties[...] key that has a typed kwarg
replacement (do_not_populate, Exclude_from_bom, type, mpn, manufacturer,
datasheet, description, and casing variants), or when mpn=/manufacturer=
are used instead of part=Part(...). Legacy values continue to be
honored; the warning just nudges users toward the endorsed forms.
Migrate examples, stdlib, and test fixtures off these legacy inputs
where the surrounding code is not specifically exercising the legacy
fallback path.
* Expose add_property as builtin.add_property and deprecate the global
Adds builtin.add_property as the endorsed entry point. The bare global
add_property still works for backwards compatibility but now emits a
deprecated.add_property warning. Stdlib callers are migrated to
builtin.add_property.
* Cleanup: warn on Description key, simpler add_property message, drop a stray mpn
* Warn on legacy module DNP property keys
Module(..., properties={...}) and add_property(...) / builtin.add_property(...)
now emit deprecated.module_property warnings when they use the legacy DNP key
spellings (do_not_populate, Do_not_populate, DNP, dnp). Pass dnp=True to
Module(...) instead. Legacy values still flow through to conversion.
* Consolidate module DNP deprecation helpers
Extract a shared warn_deprecated_module_property() to remove duplicated
diagnostic-emission boilerplate between the add_property and
properties-dict warning helpers.
* Address PR review: route sourcing keys to part=Part(...), trim changelog
- Remove mpn/Mpn/manufacturer/Manufacturer from LEGACY_COMPONENT_PROPERTY_KEYS
so they share the same part=Part(...) suggestion as the kwarg path instead
of producing a misleading two-hop deprecation (legacy -> deprecated kwarg).
- Collapse three verbose changelog entries into two short ones.
* Tighten changelog entries for legacy-properties deprecations
Make Power, Ground, NotConnected, Layout, and Board implicitly available
in user .zen files without explicit load() statements. Remove
now-redundant imports across all .zen files, tests, examples, and docs.
* feat(core): add typed Part and mutable alternatives
* test: cover Part netlist behavior in pcb-zen and pcb
* docs: fold Part spec into docs and update examples
* fix(core): preserve typed part over legacy part property
* feat(core): make part canonical over scalar sourcing fields
* refactor(core): simplify canonical part resolution
* refactor(core): simplify component sourcing flow and add unit tests
* builtin.part -> builtin.Part
* Use netlist snapshot tests for part api
* Decouple KiCad libraries with [[workspace.kicad_library]] config
Replace hardcoded KiCad repo coupling with a generic
`[[workspace.kicad_library]]` config model. Each entry declares
symbol/footprint/model repo relationships and an optional http_mirror
template for archive-based fetching.
- Add `[[workspace.kicad_library]]` schema with version, symbols,
footprints, models, and http_mirror fields
- Extract `kicad_library.rs` module with version selection, repo
matching, and config validation helpers
- Default to KiCad 9.0.3 libraries when no explicit config is provided
- Route symbol->footprint linkage through matched config entries
instead of hardcoded alias paths
- Make archive fetching config-driven via http_mirror template
- Remove hardcoded KICAD_ALIASES, kicad9-libraries-version, and
special-case kicad auto-deps mutation
- Exclude non-manifest KiCad repos from pcb.sum lockfile
- Update docs/spec to reflect new config model
* Embed 3D models into KiCad layout files
Add model_embed_discovery module that embeds referenced 3D model files
directly into .kicad_pcb output. Discovers model references in
footprints, fetches and compresses model data with zstd, and rewrites
model paths to use embedded references. This eliminates the need for
external 3D model files at layout time.
* Simplify KiCad resolution and materialization flow
Consolidate resolution maps, remove implicit KiCad dependency injection,
and simplify the materialization pipeline. Config-driven version
selection replaces scattered version parsing. Assets backcompat hook
provides fallback version hints from legacy [assets] declarations.
* Stage KiCad library files from eval for offline release validation
Move KiCad file staging into copy_sources using eval1's schematic so
validate_build needs no network access. Place files in .pcb/cache with
.pcb-cached markers. Deduplicate sexpr node builders, kicad repo
matchers, and release staging helpers. Flatten nested code in model
embed discovery.
* Simplify KiCad library types and clean up dead code
- Parse KicadLibraryConfig.version as semver::Version at deserialize
time, eliminating fallible kicad_entry_version and making match/version
functions infallible
- Move kicad_model_dirs and asset_dep_versions to methods on
WorkspaceInfo, computed on demand from config
- Remove kicad_model_dirs field from Schematic
- Simplify materialize_asset_deps to derive targets internally
- Format PCB output unconditionally at end of patch_pcb_file
- Remove dead code: package_roots dedup guard, redundant post-fetch
assertion, trivial vendor config tests, duplicate tests
- Delete superseded kicad-libraries-proposal-v3 spec
* Remove the offline field from NativePathResolver
* Update changelog
* Remove unnecessary result wrapping
* Dedup resolution logic for assets
* Encode schema version in filename
* Search all package_resolutions for kicad asset deps
* Address bot review comments, dedup
* Fix confusing arg name
* Pin stdlib version to toolchain
* Update docs
* Fix pcb.sum tidying to remove unused entries on build
* Inject stdlib into every package's resolution map
* Skip stdlib in pcb update
* Remove redundant stdlib dependencies from pcb.toml in auto-dep
* Fix auto dep snapshot
* Dedup PhysicalValue
We had 2 different PhysicalValue structs in pcb-sch and pcb-zen-core
just to avoid adding starlark deps to pcb-sch. I don't think its worth
it.
* Use rust_decimal_macros
Factor out some duplicate code
* Add proper enum -> String attr support
* Add config("mpn") to generated components for compat
* Format list component properties nicely when exporting to kicad
* Format physical value, enum, list kicad properties in compiler
* Don't rely on __attr__ values
Handle typed, stringified component properties directly.
* Title case kicad properties
- Make # of user layers configurable (defaults to 4)
- Preserve all kicad standard technical layers
- Add 0 value placeholder entries for predefined sizes
- Fix layers sexpr formatting
- Make netclass diff_pair_via_gap and priority configureable
- For "Default" netclass, modify the default
- Add better type hints
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Refactor diagnostics for warnings support
- Add render trait
- Render warnings after errors
- Reuse build code across build, layout
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Delete bundle
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix clippy lints
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add git ref metadata
3 stages to fetch_remote:
- Ensure remote is in cache
- Add appropriate symlinks
- Classify + store ref metadata
Some code cleanup:
- Factored out some git clone dupe code
- Centralized git operations in git.rs
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Warn on unstable refs
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add "-Dwarnings" flag to error on warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Warn on unstable refs in Module()
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add snapshot tests for warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix span detection for chained Module()
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add ResolveContext, dedup resolve code
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use spec history for better alias warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add pcb.toml spans
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add type-erased error storage to Diagnostic
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix bug with load() span detection
The previous logic would just attempt to match by path, but if there are
multiple load() statements in a single file with the same path, then
find_load_span_for_path with always return the first.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Added diagnostics passes
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add LSP-specific pass to filter out some warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix rebase conflicts
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix unstable ref detection logic
If we clone by tag and the tag exists in the git repo, it's a stable
ref. Same with commit.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add structured, unmatched BOM export command
Run using `pcb bom <path/to/zen> -o json`
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Test bom command in CI
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Bump stdlib in examples from v0.2.0 to v0.2.2
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Remove default_multiplier, use struct for group key
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use PhysicalValue to do less string parsing
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add alternatives to group key
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use DynamicFullWidth for the comfy table
Attempts to fit the table within terminal width.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>