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
Mustafa7
Mustafa7OP3w ago
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
DOPΣ
DOPΣ3w ago
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
Mustafa7
Mustafa7OP3w ago
@DOPΣ do you have any idea about the issue above? Can anyone help @Seve
Mustafa7
Mustafa7OP3w ago
Thanks I'll get back to you
Seve
Seve3w ago
yea a small script could help?
Mustafa7
Mustafa7OP3w ago
@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?
Seve
Seve3w ago
@tscircuit/eval should expose a getPlatformConfig() function you can use! you are on the right track!!!
Mustafa7
Mustafa7OP3w ago
CLI does not have eval dep SHould i install?
Seve
Seve3w ago
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
Mustafa7
Mustafa7OP3w ago
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?
DOPΣ
DOPΣ3w ago
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
Mustafa7
Mustafa7OP3w ago
Done, added you as a collaborator
DOPΣ
DOPΣ3w ago
- cause of issue :
import { getPlatformConfig as getEvalPlatformConfig } from "@tscircuit/eval"
import { getPlatformConfig as getEvalPlatformConfig } from "@tscircuit/eval"
- probable cause file https://github.com/tscircuit/props/blob/main/lib/components/analogsimulation.ts
Mustafa7
Mustafa7OP3w ago
Thanks for your investigation. Idk if adding @tscircuit/eval in cli will be a good option, lets wait for seve @Seve
DOPΣ
DOPΣ3w ago
its yellow light, wait ig 🤣
No description
Rishabh
Rishabh3w ago
No, you shouldn’t be adding eval in cli. We have faced issues before because of that iirc
Seve
Seve3w ago
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 😭
DOPΣ
DOPΣ3w ago
out of way, but that might be fixed if eval updated ig https://github.com/tscircuit/eval/pull/1556
Mustafa7
Mustafa7OP3w ago
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
Seve
Seve3w ago
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 directory
Mustafa7
Mustafa7OP3w ago
Currently am not home. I'll let you know So I'll need to modify eval right To export it
Seve
Seve3w ago
Yea add an additional export- But it would still be a dep (In that case)
Mustafa7
Mustafa7OP3w ago
Mustafa7
Mustafa7OP3w ago
@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?
No description
Seve
Seve3w ago
Yes In fact you should only be adding “tsci add” in the first pr probably
Mustafa7
Mustafa7OP3w ago
tsci add command is already there in the cli It installs a component
Seve
Seve3w ago
it is supposed to install any dependency including github urls same as bun add
Mustafa7
Mustafa7OP3w ago
@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?
Rishabh
Rishabh3w ago
Update the version of tscircuit in cli?
Mustafa7
Mustafa7OP3w ago
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
Rishabh
Rishabh3w ago
Interesting, I don't think updating the version should be an issue.
Mustafa7
Mustafa7OP3w ago
@Seve https://github.com/tscircuit/cli/pull/1016 can you check this install command

Did you find this page helpful?