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

Identify the version built with cabal #444

Closed
teto opened this issue Sep 29, 2020 · 5 comments
Closed

Identify the version built with cabal #444

teto opened this issue Sep 29, 2020 · 5 comments
Labels
CI Continuous integration type: enhancement New feature or request

Comments

@teto
Copy link
Contributor

teto commented Sep 29, 2020

When building from master (with bazel), I get the following output

bazel run @hls-exe//haskell-language-server -- --version
INFO: Invocation ID: fb19e081-f4d8-4423-ad90-e3d2a3f92ac8
INFO: Analyzed target @hls-exe//haskell-language-server:haskell-language-server (2 packages loaded, 8669 targets configured).
INFO: Found 1 target...
Target @hls//:_haskell-language-server_exe_haskell-language-server up-to-date:
  bazel-bin/external/hls/haskell-language-server-0.4.0.0/_install/bin/haskell-language-server
INFO: Elapsed time: 10.631s, Critical Path: 0.09s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
haskell-language-server version: 0.4.0.0 (GHC: 8.8.3) (PATH: /home/teto/.cache/bazel/_bazel_teto/32070fb26dd3cfe8bd075800f8bb83d1/execroot/toplevel_workspace/bazel-out/k8-fastbuild/bin/external/hls/haskell-language-server-0.4.0.0/_install/bin/haskell-language-server)

it still prints 0.4.0.0 as a version (as the current .cabal on master). It would be nice to bump the version after a release so that one knows from --version if he runs a development version or not.

@alanz
Copy link
Collaborator

alanz commented Sep 29, 2020

I would like to see the commit in the version, but I think that is complicated when installing via cabal.

@jneira
Copy link
Member

jneira commented Sep 29, 2020

Yeah, gitrev does not work with cabal v2-install: acfoltzer/gitrev#23
I think there is a workaround involving env vars, maybe we can try to include it in the install script
There is no builtin workaround in the package, we will have to add it in the code, using a env var HLS_GIT_COMMIT as fallback and use it in the install script with cabal.

@jneira jneira added CI Continuous integration type: enhancement New feature or request good first issue labels Oct 2, 2020
@jneira jneira changed the title bump release version after release Identify the version built with cabal Oct 2, 2020
@teto
Copy link
Contributor Author

teto commented Oct 2, 2020

having a commit would be the best but even having it echo RELEASE + 1 (aka 0.5.0.0) would be enough to let me know I am on the next release.

@alanz
Copy link
Collaborator

alanz commented Oct 2, 2020

@teto That makes sense. Perhaps we should move onto one of those odd-even schemes, so immediately after we tag a release we bump the version number. So so be clear

Release 0.5.0.0
Make 0.6.0.0 (dev) (for a month roughly)
Release Release 0.7.0.0
Make 0.8.0.0

and so on

@jneira
Copy link
Member

jneira commented Jun 17, 2021

Mmm, i am not wrong i will swear hls binaries from releases has the commit in the version, not sure why 😄

PS D:\dev\ws\haskell\ghcup-hs> D:\ghcup\bin\haskell-language-server-8.10.2.exe --version
haskell-language-server version: 1.2.0.0 (GHC: 8.10.2) (PATH: D:\ghcup\bin\haskell-language-server-8.10.2~1.2.0.exe) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)

@jneira jneira closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants