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

rust-analyzer: 2020-06-01 -> 2020-06-15 and fix version display #90976

Closed
wants to merge 2 commits into from

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Jun 18, 2020

Motivation for this change

Bump version.
Fix output when it is called with --version. (Used to be ??????)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@flokli
Copy link
Contributor

flokli commented Jun 18, 2020

With #90211 merged, can this be rebased onto it?

Also, cc @lovesegfault on the version display. Isn't there a better way to pass this in?

@lovesegfault
Copy link
Member

@flokli I think this approach is fine, although perhaps it could benefit from being upstreamed with an explanation of why this helps us in Nix land.

@flokli
Copy link
Contributor

flokli commented Jun 19, 2020

Humm… I thought about using the git-version crate (but didn't check if it allows overriding the version via an env variable), instead of implementing (and extending the logic on our own)

bors bot added a commit to rust-lang/rust-analyzer that referenced this pull request Jun 19, 2020
4937: Allow overriding rust-analyzer display version r=matklad a=oxalica

The build script invokes `git` for version information which is displayed when rust-analyzer is called with `--version`. But in build environment without `git` or when the source code is not a git repo, there's no way to manually specify the version information.

This patch respects environment variable ~`REV`~ `RUST_ANALYZER_REV` in compile time for overriding.

Related: NixOS/nixpkgs#90976

Co-authored-by: oxalica <oxalicc@pm.me>
@oxalica
Copy link
Contributor Author

oxalica commented Jun 19, 2020

Maybe we could wait for the next release to fix it.

@oxalica oxalica closed this Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants