banacorn / agda-mode-vscode

agda-mode on VS Code
https://marketplace.visualstudio.com/items?itemName=banacorn.agda-mode
MIT License
167 stars 38 forks source link

From Agda 2.6.4: Simpler way to get Agda version using `--numeric-version` option #138

Open andreasabel opened 1 year ago

andreasabel commented 1 year ago

This code seems to parse the version of Agda from the output of agda -V: https://github.com/banacorn/agda-mode-vscode/blob/905ec6189976b98f6806d73c735c9602c0f39bda/src/Connection/Emacs/Connection__Emacs.res#L35 Agda >= 2.6.4 should have a --numeric-version option.

This could be utilized at some point, but maybe you need to be handle older versions of Agda, so it might not be so useful in the near future.

I am also changing the output of agda -V by adding a few lines with information about the cabal flags used during build, but hopefully this will not destroy your version parser here: The output of agda -V will still start with Agda version VERSION_STRING.