Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --version CLI flag #540

Closed
jiribenes opened this issue Aug 9, 2024 · 0 comments · Fixed by #556
Closed

Add --version CLI flag #540

jiribenes opened this issue Aug 9, 2024 · 0 comments · Fixed by #556
Assignees

Comments

@jiribenes
Copy link
Contributor

jiribenes commented Aug 9, 2024

In tooling (especially in effekt-lang/effekt-vscode#20), it would be nice to know the version of the current Effekt executable so that we can offer a newer version.

We already surface the version number via the REPL, but it would be much easier if tooling could rely on an easily parseable format.

Specification

When the user specifies the --version flag, the program prints the effekt.util.Version.effektVersion and exits successfully. Note that the successful exit is very important, this allows us to automate a bunch of things.

I'm not really sure if it's better to implement this in Kiama for REPLConfig directly or here for EffektConfig.

Alternatives

We could also just assume every user installed Effekt via npm and check the version there, but that feels extremely finicky to me -- it would also break my own workflow, as my Effekt is never installed via npm :)

Related work

For example in npm and node:

$ npm --version
10.5.0

$ node --version
v20.12.2
@jiribenes jiribenes added help wanted Extra attention is needed good first issue Good for newcomers quality-of-life labels Aug 9, 2024
@jiribenes jiribenes self-assigned this Aug 26, 2024
@jiribenes jiribenes removed help wanted Extra attention is needed good first issue Good for newcomers labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant