← Back to community index
# contributor·Active

shibo - @Rishabh

mention

Started by shiboJun 17, 202634 messages

Discussion

Last active 27 days ago · plain text
shibooriginal post
<@809856037376491570>
shibo
this is preventing tscircuit package from updating
Rishabh
I know, you need to update the core with the latest version of `kicad-to-circuit-json`
Rishabh
<@452450065941004289> was working on a PR for that
! Rushabh | Linux Shill
https://github.com/tscircuit/core/pull/2450
! Rushabh | Linux Shill
tests are failing the tests are flaky because they assert exact rendered images for large imported trace networks whose element ordering is not guaranteed to be stable across runs. iremoved the snapshot checks
Rishabh
Can you explain more with an example? They should be ordered
Rishabh
Why it's happening after updaing the package version?
! Rushabh | Linux Shill
repro116: Before the dependency update: - imported Arduino Uno data had roughly: - 188 pcb_trace - 188 source_trace - so there was effectively a 1:1 mapping - order was simpler and the rendered result was more stable After updating kicad-to-circuit-json / kicadts: - the same board imports as: - 188 pcb_trace - 109 source_trace - now multiple pcb_trace rows can share the same source_trace_id
Rishabh
Even that shouldn't be dropping traces in the snapshot. We still have the same number of pcb_trace before and after so the snapshot should be same
Rishabh
<@1079361271687807026> Is this related to the trace split mapping to the trace id change you did?
Mustafa7
we are not doing trace splitting for normal traces, its only related to breakout points and also did not find any issues in core while i was doing it and the change was only related to breakouts. And we are not creating 2 traces for normal components. I dont think its a breakout srj issue
Mustafa7
Traces are same number right so whys it dropping traces?
shibo
maybe it's an old issue
! Rushabh | Linux Shill
v0.0.72 is a trace related fix maybe
! Rushabh | Linux Shill
The package update did not reduce the number of physical PCB traces. The Arduino Uno import still produces 188 pcb_trace records. What changed is the grouping: the import now yields fewer source_trace records, so one source_trace_id can map to multiple pcb_traces.
! Rushabh | Linux Shill
core was still written for the old 1:1 assumption and only inflated one trace per source_trace_id, which made some routed segments disappear in the inflated output. So the drop was happening during core inflation, not in kicad-to-circuit-json import.
Mustafa7
Can you check if it's a source_trace_id assignment issue in core?
Mustafa7
Is it a core issue?
! Rushabh | Linux Shill
yes ig
! Rushabh | Linux Shill
was able to update till v0.0.71 without any issue
! Rushabh | Linux Shill
https://github.com/tscircuit/core/pull/2460
! Rushabh | Linux Shill
v0.0.72 causes trace loss
Mustafa7
What changed in 0.0.72? Ws it related to traces
! Rushabh | Linux Shill
trace mapping issue in core ig
! Rushabh | Linux Shill
i think <@778624824875941908> can explain this better https://github.com/tscircuit/kicad-to-circuit-json/pull/105
Mustafa7
Ig guess core correctly assigns the source_trace_ids, otherwise there would have been issues in other repos as well. I think it's a kicad-to-circuit-json issue
shibo
@here fix without modifying the tests: https://github.com/tscircuit/core/pull/2461
! Rushabh | Linux Shill
i was close 😅
shibo
it's blocking me so we gotta get this issue resolved asap
shibo
<@809856037376491570> how's it looking?
! Rushabh | Linux Shill
no issue
! Rushabh | Linux Shill
`The Spice Must Flow`
shibo
<@809856037376491570> did the refactor

Want to add to the conversation?

Reply in Discord so your notes stay connected to the source.
Continue in Discord ↗