T
tscircuit2mo ago
shibo

tscircuit has circular deps

@Seve
tscircuit@0.0.583 /home/shibo/tscircuit/tscircuit
├─┬ @tscircuit/cli@0.1.196
│ └─┬ tscircuit@0.0.560
│ ├─┬ @tscircuit/core@0.0.576
│ │ └── bpc-graph@0.0.57 deduped
│ └── bpc-graph@0.0.57
├─┬ @tscircuit/core@0.0.615
│ └── bpc-graph@0.0.66 deduped
├── bpc-graph@0.0.66
└─┬ circuit-json-to-bpc@0.0.13
└── bpc-graph@0.0.66 deduped
tscircuit@0.0.583 /home/shibo/tscircuit/tscircuit
├─┬ @tscircuit/cli@0.1.196
│ └─┬ tscircuit@0.0.560
│ ├─┬ @tscircuit/core@0.0.576
│ │ └── bpc-graph@0.0.57 deduped
│ └── bpc-graph@0.0.57
├─┬ @tscircuit/core@0.0.615
│ └── bpc-graph@0.0.66 deduped
├── bpc-graph@0.0.66
└─┬ circuit-json-to-bpc@0.0.13
└── bpc-graph@0.0.66 deduped
how to approach this?
8 Replies
Seve
Seve2mo ago
The CLI shouldn't have tscircuit as a peer IIUC or it should be marked as an optional peer?
Seve
Seve2mo ago
idk it looks like we have been trying stuff here...
No description
shibo
shiboOP2mo ago
I feel like the cli shouldn't have peer deps, it should be self contained
Seve
Seve2mo ago
so normally i would agree but it's a special case the CLI runs tsx code and it's expected that it will use the "tscircuit" version that the user has installed to their package this means that we shouldn't bundle "tscircuit" inside the CLI
Seve
Seve2mo ago
what would happen if we made it an optional peer dep i wonder? i'm a bit worried looking at the git blame
No description
Seve
Seve2mo ago
i believe their is a status page and test to prevent breakage for that case now, so it could be worth trying i don't see how it's the wrong solution
shibo
shiboOP2mo ago
now I change it to optional and see how it goes?
Seve
Seve2mo ago
yea

Did you find this page helpful?