-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 the RLS as a submodule and build a package out of it #40584
Conversation
A few thoughts:
|
src/bootstrap/lib.rs
Outdated
@@ -1018,6 +1018,21 @@ impl Build { | |||
panic!("failed to find version in cargo's Cargo.toml") | |||
} | |||
|
|||
/// Returns the `a.b.c` version that the RLS is at. | |||
fn rls_release_num(&self) -> String { |
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.
Could this be deduplicated with the cargo version of this function above?
I think it'd also be helpful to generate some rls tarballs and poke around to make sure they look right (e.g. similar to Cargo tarballs and such) |
☔ The latest upstream changes (presumably #40693) made this pull request unmergeable. Please resolve the merge conflicts. |
I think we should not do that after all, the reason being that the rls also depends on the rust-src package, and there are reasons not to merge rust-src into rls, so if we have to have 2 packages, why not 3. I'll look closer tomorrow. |
ah ok yeah that makes sense, if we have rust-src + rls at least then it doesn't make much sense to worry about rust-analysis. |
src/bootstrap/dist.rs
Outdated
@@ -598,6 +636,11 @@ pub fn extended(build: &Build, stage: u32, target: &str) { | |||
let cargo_installer = dist.join(format!("cargo-{}-{}.tar.gz", | |||
build.package_vers(&cargo_vers), | |||
target)); | |||
let rls_installer = dist.join(format!("{}.tar.gz", | |||
pkgname(build, "rls"))); |
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.
This needs to be "{}-{}.tar.gz", with a final argument of target
. That will put the target triple in the tarball filename, which is needed for disambiguation.
src/bootstrap/dist.rs
Outdated
t!(fs::create_dir_all(pkg.join("rust-docs"))); | ||
t!(fs::create_dir_all(pkg.join("rust-std"))); | ||
|
||
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target)), | ||
&pkg.join("rustc")); | ||
cp_r(&work.join(&format!("cargo-nightly-{}", target)), | ||
&pkg.join("cargo")); | ||
cp_r(&work.join(pkgname(build, "rls")), | ||
&pkg.join("rls")); |
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.
This also needs the target.
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.
(but just delete it)
src/bootstrap/dist.rs
Outdated
@@ -729,6 +786,12 @@ pub fn extended(build: &Build, stage: u32, target: &str) { | |||
cp_r(&work.join(&format!("cargo-nightly-{}", target)) | |||
.join("cargo"), | |||
&exe.join("cargo")); | |||
cp_r(&work.join(pkgname(build, "rls")) | |||
.join("rls"), | |||
&exe.join("rls")); |
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.
And here.
src/bootstrap/dist.rs
Outdated
@@ -669,20 +714,28 @@ pub fn extended(build: &Build, stage: u32, target: &str) { | |||
let _ = fs::remove_dir_all(&pkg); | |||
t!(fs::create_dir_all(pkg.join("rustc"))); | |||
t!(fs::create_dir_all(pkg.join("cargo"))); | |||
t!(fs::create_dir_all(pkg.join("rls"))); | |||
t!(fs::create_dir_all(pkg.join("rust-analysis"))); |
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.
All of the changes in this file from here down only affect the platform-specific .msi and .pkg installers, and will not work correctly without further modifications of their definitions. I think you should remove them all for now (everything inside the target.contains("apple-darwin")
and `target.contains("windows").
src/bootstrap/dist.rs
Outdated
.arg("-t").arg(etc.join("msi/squash-components.xsl"))); | ||
build.run(Command::new(&heat) | ||
.current_dir(&exe) | ||
.arg("dir") |
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.
This is all .msi stuff and isn't going to work without defining RlsGroup.wxs etc. Just remove for now.
As @alexcrichton said build-manifest needs to be taught about the rls in order for rustup to find it. Just copy the cargo stuff, except that the rls is an "extension", not a "component". |
Could you explain why please? My understanding was that by adding only to |
@nrc oh that's for rustup, but the combined installers (e.g. |
So, I think I've removed all that stuff (at brson's request) and that it should be just optional now? Ready for re-review @alexcrichton /@brson |
@bors r+ |
📌 Commit 6f06143 has been approved by |
⌛ Testing commit 6f06143 with merge ed6580b... |
💔 Test failed - status-appveyor |
@bors: retry |
1 similar comment
@bors: retry |
⌛ Testing commit 6f06143 with merge 899539b... |
💔 Test failed - status-appveyor |
@bors: r- Oh I was hoping to do some more testing on this before landing, have we run the installers on Windows yet? I also am worried about the regression to cycle time this will bring because we are already a half hour too slow. To test I think we should generate the windows and osx installers and make sure they look right. For cycle time we should split all the dist builders in two (they're all producing two targets right now). Sorry on my phone so it's hard to link issues but I'll try to fill in soon. I'll also try to help out with this when I'm back from traveling, but that'll be a week or so |
@bors: r+ I'll open follow-up tracking issues for various issues |
📌 Commit 99656e9 has been approved by |
⌛ Testing commit 99656e9 with merge b36dfb0... |
Add the RLS as a submodule and build a package out of it r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like. This does not attempt to run tests for the RLS yet.
💔 Test failed - status-travis |
Sounds valid? (search for |
@aidanhs - not sure how this would be related to the RLS stuff, though perhaps it's related to other infra fixes? |
Yes this is a valid error, but not related to sccache:
I'll try to fix soon. |
* Use the right version when building combined installer * Update dependencies of rls as it depends on rustc and plugins * Fix build-manifest and the versions it uses for the rls
99656e9
to
13d008d
Compare
@bors: r+ |
📌 Commit 13d008d has been approved by |
⌛ Testing commit 13d008d with merge 7803c08... |
Add the RLS as a submodule and build a package out of it r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like. This does not attempt to run tests for the RLS yet.
Add the RLS as a submodule and build a package out of it r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like. This does not attempt to run tests for the RLS yet.
@bors retry Prioritizing the rollup which includes this |
Add the RLS as a submodule and build a package out of it r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like. This does not attempt to run tests for the RLS yet.
☀️ Test successful - status-appveyor, status-travis |
r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run
x.py dist
and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like.This does not attempt to run tests for the RLS yet.