-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Bring the version command output in line with other rust tools #12449
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
Conversation
crates/rust-analyzer/build.rs
Outdated
if option_env!("CFG_RELEASE").is_none() { | ||
println!("cargo:rustc-env=POKE_RA_DEVS"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of note here is, poking only happens if the server is built without a release version set (so local builds will poke as before)
@@ -72,7 +72,8 @@ fn dist_client( | |||
} | |||
|
|||
fn dist_server(sh: &Shell, release_channel: &str, target: &Target) -> anyhow::Result<()> { | |||
let _e = sh.push_env("RUST_ANALYZER_CHANNEL", release_channel); | |||
let _e = sh.push_env("CFG_RELEASE_CHANNEL", release_channel); | |||
let _e = sh.push_env("CFG_RELEASE", "0.0.0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't currently have a notion of server version when doing our own builds so I left this as 0.0.0 (if left unset we would poke people again). We could of course also set this to any string we want, not necessarily a version. It would probably make sense to make this differ from the usual 1.56.0-stable
like versions of the rust toolchain since this build is independent from that.
Not sure how rustbuild works though so @cuviper, you should probably have a look at this as well since you opened the issue. This also needs an adjustment for the submodule building the rust repo I imagine since this changes the env vars. |
Looks good to me! Those Not sure what you mean about the submodule -- build scripts should run in your source dir, so I think git will see the right thing. |
@bors r+ |
1 similar comment
@bors r+ |
📌 Commit a2a3ea8 has been approved by |
☀️ Test successful - checks-actions |
Inspired by how cargo handles it

Fixes #12280