kinode-dao / kinode

Kinode OS runtime
https://kinode.org
Apache License 2.0
32 stars 12 forks source link

feature: gracefully handle `-`s vs `_`s in wasm filenames #527

Open nick1udwig opened 2 weeks ago

nick1udwig commented 2 weeks ago

Is your feature request related to a problem? Please describe. https://github.com/kinode-dao/kit/issues/216 documents annoyance of cargo preferring _s and Kimap App Store protocol preferring -s. https://github.com/kinode-dao/kit/pull/222 resolved this on the kit side by making kit more robust wrt _s vs -s and just "doing the right thing". There is still some trickiness here associated with our manifest.json files, where we specify a file path for processes.

Describe the solution you'd like Make Kinode core, when given a process path of foo-bar.wasm, if not found, check for foo_bar.wasm (and vice versa!). Print a verbosity 1 message if this switcheroo happens so that devs can be informed.

Ideally this should happen for both manifest.json, scripts.json, and spawn() to give a consistent behavior across all process-spawning interfaces.

Describe alternatives you've considered This is in addition to kit being better. E.g., kit could read manifest.json and see if the corresponding .wasm file exists; error out with useful error message if it does not.

Additional context @dr-frmr what do you think about this?

dr-frmr commented 2 weeks ago

Yup, ought to do this