by debugnik · 1y ago · 0 comments
The link they shared and you didn't open, which is precisely an example of multiple recipes with different #!/usr/bin/env shebang lines, such that a single just file can mix different languages.
I'm not sure I like how they handle the shebang on different platforms, though. It makes just files non-portable even when using a language other than a shell.
If the program hosted its own interpreters for multiple scripting languages, then it would make sense to call it polyglot.
Also, you wrote "Why not call out /usr/bin/env instead?" which is exactly what the example was doing, so I assumed your own proposal would have seemed sufficient to you, had you seen it.
But I feel I’ve come around to your perspective. Mine was overly pedantic.
As I said, I don't even like Just's approach as it isn't even cross platform, but I guess solving this properly would require tying the recipe runner to a package repository per platform. I still appreciate that Just tried to make it a legible built-in feature though.