Mustafa7 - @DOPΣ @Rishabh When importing a .kic...
@DOPΣ @Rishabh When importing a .kicad_mod file and passing it as the footprint prop to a <chip> component, should the KiCad footprint be automatically parsed into PCB elements during build/render, or does this only happen in the dev server/viewer? Currently tsci build preserves the footprint string but doesn't generate the actual pad elements.
the issue is that when we import a .kicad_mod file and pass it as a footprint prop to <chip>, the KiCad footprint string isn't being parsed into actual PCB elements (pads, holes, etc.) during tsci build.
i am working on supporting
tsci install 'github url' eg: tsci install https://github.com/espressif/kicad-libraries. Can anyone help me here?33 Replies
here is the pr https://github.com/tscircuit/cli/pull/1016
this is just a draft one
WIP
And anyone knows why does the github-actions bot adding commits to my pr? random readme file commits
Hilarious
It was due to this workflow
https://github.com/tscircuit/cli/blob/main/.github%2Fworkflows%2Fupdate-readme.yml
In your fork, it doesn't do anything unnecessary it just keeps up the latest help menu kinda for cli
@DOPΣ do you have any idea about the issue above?
Can anyone help
@Seve
https://github.com/tscircuit/core/blob/de24ac83aab9533baddcc1296251a1cf1f2a88c9/lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts#L32-L82
https://github.com/tscircuit/eval/blob/48ac4b0a2b60206d9ad432d517716807ab471ac7/lib/getPlatformConfig.ts#L60-L71
it would be helpful if you share repro, expected and observed etc info, it unable to find fix, but parsing logic is stated above
Thanks I'll get back to you
yea a small script could help?
@Seve
tsci dev uses @tscircuit/runframe which internally uses @tscircuit/eval
@tscircuit/eval provides a platform config via getPlatformConfig() that includes footprintFileParserMap.kicad_mod with KiCad parsing support
tsci build uses generate-circuit-json.tsx which wasn't providing any platform config with KiCad parsing capabilities
Without the parser, @tscircuit/core couldn't parse .kicad_mod file contents into circuit JSON elements.
My solution would be:
Create a new getPlatformConfig() function in getPlatformConfig.ts that provides KiCad parsing support using kicad-component-converter. This platform config is then used in generate-circuit-json.tsx.
Am I right? or we should use @tscircuit/eval directly in CLI?@tscircuit/eval should expose a
getPlatformConfig() function you can use!
you are on the right track!!!CLI does not have eval dep
SHould i install?
it may be a transient dependency
if not then yes you can install it
(it might already be there as a transient dependency of e.g. tscircuit)
i'm pretty sure it's a transient
Yes its a transient dep
@DOPΣ https://github.com/tscircuit/cli/pull/1016
can you check this
And do you know why the smoke test is failing?
aaaaa man github isnt allowing me to fork your fork, or create new pr with your fork, can u invite me as admin in your fork or something i can try only then, since unable to repro
Done, added you as a collaborator
- cause of issue :
- probable cause file
https://github.com/tscircuit/props/blob/main/lib/components/analogsimulation.ts
Thanks for your investigation. Idk if adding @tscircuit/eval in cli will be a good option, lets wait for seve
@Seve
its yellow light, wait ig 🤣

No, you shouldn’t be adding eval in cli. We have faced issues before because of that iirc
isn't it a transient?
oh ok i read this all now
how is Mustafa going to get the platform config without loading it from eval? Should we have
@tscircuit/default-platform-config as a module?
@Mustafa7 when you import from eval, try importing more specifically, e.g. @tscircuit/eval/...
@Mustafa7 btw i forgot to mention that we have weekly meetings twice a week for staff that you can join, our next one is at 8:30am PT Thursday, could have helped you this morning 😭out of way, but that might be fixed if eval updated ig
https://github.com/tscircuit/eval/pull/1556
It's a transitive dependency
@DOPΣ @Rishabh https://github.com/tscircuit/cli/pull/1016
Can you check if lazy loading eval is fine so that it doesn't get bundled? not sure what will be other solution if thats not the best option. Currently thats the only option i have in mind.
@Seve
hi all
@Mustafa7 lmk if you want to have a quick meeting to go over this
@Mustafa7 i don't think you need to lazy load, just make sure that there's a suitable
@tscircuit/eval export that you can import, e.g. @tscircuit/eval/platform-config
i'm not opposed to lazy loading from the user's directoryCurrently am not home. I'll let you know
So I'll need to modify eval right
To export it
Yea add an additional export-
But it would still be a dep
(In that case)
@Seve Does your comment mean both
tsci install 'github url' and tsci add 'github url should do the same thing of installing the github library right?
basically add command should support both component(package) and github lib installing right?
Yes
In fact you should only be adding “tsci add” in the first pr probably
tsci add command is already there in the cli
It installs a component
it is supposed to install any dependency including github urls same as
bun add@Seve
@Rishabh CLI has
"tscircuit": "^0.0.880-libonly" due to which I cannot use the latest version of eval for the importing of @tscircuit/eval/platform-config, currently eval version is 0.0.462 in CLI but the latest version is 0.0.492. What should be done? why is it pointing to that specific version?Update the version of tscircuit in cli?
But idk if seve wants to approve it, coz it's pointing to a specific version. One time I had asked him about updating the version ig he said no, that's why.
I'll ask him again what he says
Interesting, I don't think updating the version should be an issue.