Open lpil opened 7 months ago
i like this idea. would it be a separate command?
eg. gpx ____ (short for gleam package execution)
or something part of the main binary? eg. gleam x _____
also, a command i've been using to get the erlang version info is:
erl -eval 'io:format("OTP: ~s, ERTS: ~s~n", [erlang:system_info(otp_release), erlang:system_info(version)]), halt().' -noshell
output:
OTP: 26, ERTS: 14.2.2
It would be in the same binary. Perhaps something like gleam run --package blah
Personally, I think the gleam run
command is pretty good for this, since it has a good bit of customizability (target, runtime, arguments) which is sometimes needed when running things. Or, at least, a subcommand for this should inherit gleam run
's syntax.
I like the idea of simply using run
with an additional option.
I was thinking these may be more clear to the intent.
gleam run --hex <package>
gleam run --remote <package>
Coming from the JS world - mainly Deno.. Perhaps using a specifier before the package name could be an elegant way to denote that we want to run a non-local package.
gleam run hex:package
gleam run hex:package
would be passing hex:package
as a command line argument to your program, so that's not an option here.
Similar to npx.
We likely need to know when to recompile any Erlang bytecode as when the VM version changes the bytecode may no longer be valid. manveru on discord suggested this way of getting the Erlang version.
What should the CLI be?