spin build currently always creates a spin-dependencies.wit. The idea was that this would allow us to have bindings generation in the templates in the simplest way possible.
However, the downside is that it turns out to be what software experts call "butt ugly." You're not using dependencies but suddenly every single project in your app has one of these turd-like empty files. Maybe it's not so annoying in a big project but for smaller projects it's a lot - and even in big projects devs get very protective over "stupid tools putting crap I didn't ask for in my code folder".
So I'd like to change the logic so that, if there are no dependencies, the spin-dependencies.wit is not created (or is deleted).
The downside of this is that it requires additional logic in the templates / binding generators to handle the case where the file doesn't exist. This could be done with a SDK macro in Rust; in other languages, it might need more logic in the build script (e.g. the npm task), and we'd want to be confident we could do this in a cross-platform way.
Thoughts?
spin buildcurrently always creates aspin-dependencies.wit. The idea was that this would allow us to have bindings generation in the templates in the simplest way possible.However, the downside is that it turns out to be what software experts call "butt ugly." You're not using dependencies but suddenly every single project in your app has one of these turd-like empty files. Maybe it's not so annoying in a big project but for smaller projects it's a lot - and even in big projects devs get very protective over "stupid tools putting crap I didn't ask for in my code folder".
So I'd like to change the logic so that, if there are no dependencies, the
spin-dependencies.witis not created (or is deleted).The downside of this is that it requires additional logic in the templates / binding generators to handle the case where the file doesn't exist. This could be done with a SDK macro in Rust; in other languages, it might need more logic in the build script (e.g. the npm task), and we'd want to be confident we could do this in a cross-platform way.
Thoughts?