google / pcbdl

PCB Design Language: A programming way to design schematics.
Other
155 stars 23 forks source link

Show error when multiple parts with the same ref.des. in schematic #1

Closed kiavash-at-work closed 5 years ago

kiavash-at-work commented 5 years ago

Like this code must show error:

# USB Connection section
DM << (
    R("100k", "R58", to=VBUS, populated=False),
    R("200k", "R57", to=gnd, populated=False),
)

DP << (
    R("100k", "R58", to=VBUS, populated=False),
    R("200k", "R57", to=gnd, populated=False),
)
amstan commented 5 years ago

Yep, this needs a failing test.

Context.new_part should check that "part.name not in (part.name for part in self.parts_list)"