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

Rewrite the rust-installer submodule in Rust #41569

Closed
alexcrichton opened this issue Apr 26, 2017 · 10 comments
Closed

Rewrite the rust-installer submodule in Rust #41569

alexcrichton opened this issue Apr 26, 2017 · 10 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

The rust-installer repository has long served the purpose of generating manifests and installers for all of our standard artifacts. Over time though it's unfortunately really showing its age as it's become more and more difficult to maintain over time. With rustbuild nowadays let's take this opportunity to rewrite it into Rust!

This transition would most likely look like:

  • Add a new tool, src/tools/installer
  • Add appropriate crates.io dependencies to src/tools/installer/Cargo.toml
  • Reimplement the installer in Rust, including various commands and scripts.
  • Replace all calls in dist.rs to rust-installer/*.sh to calls into this new project. For an example of invoking a tool written in Rust, you can see how we call cargotest

This'd be a great opportunity for anyone looking to get their feet wet with Rust's distribution infrastructure and build system! It's also a relatively meaty project to boot :)

@alexcrichton alexcrichton added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 26, 2017
@steveklabnik steveklabnik added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 27, 2017
@cuviper
Copy link
Member

cuviper commented Apr 27, 2017

I understand writing the package generators in Rust, but how can you do that for the installer itself? Doesn't that need to be platform-neutral?
(but then, I don't know how Windows deals with install.sh even today...)

@alexcrichton
Copy link
Member Author

Oh sorry right I should clarify! I definitely do not think we should rewrite install.sh. I'm just thinking the gen-installer.sh and combine-installers.sh scripts could be rewritten. Those are just used in tarball generation. The tarballs themselves should not change as a result of this issue.

@cuviper
Copy link
Member

cuviper commented Apr 27, 2017

Great, makes sense. I'd like to work on this, if you don't already have someone else...

@alexcrichton
Copy link
Member Author

Nah you're definitely more than welcome!

@Diggsey
Copy link
Contributor

Diggsey commented Apr 30, 2017

@cuviper the "installer" logic is technically ported to rust already, it's built into rustup (install.sh is not used for rustup installs, which is also why you can install rust on windows!)

@cuviper
Copy link
Member

cuviper commented May 1, 2017

Ah, thanks!

@cuviper
Copy link
Member

cuviper commented May 3, 2017

Here's my work in progress: https://github.com/cuviper/rust-installer/tree/oxidize

One script down (gen-installer.sh), three to go...

@cuviper
Copy link
Member

cuviper commented May 6, 2017

OK, I think that branch is ready to start reviewing.

@alexcrichton I did this as an in-place port, but re-reading your original description, it sounds like you envisioned something entirely new. Well, from here we can take this whatever direction you want. Do you think this should still be used as a rust-installer submodule, or a new crate pulled into rust's own repo?

Either way, we should be able to get rustbuild using this as a library, doing everything in-process. I haven't started on that yet, but the rust-installer/*.sh scripts are now shims to the new crate binary, so we can probably try dropping this right in place.

@Mark-Simulacrum
Copy link
Member

It's probably easiest to review if you put up the code as a PR. Could you do that?

@cuviper
Copy link
Member

cuviper commented May 6, 2017

OK, see rust-lang/rust-installer#62.

frewsxcv added a commit to frewsxcv/rust that referenced this issue May 11, 2017
…richton

Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes rust-lang#41569.  r? @alexcrichton
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 12, 2017
…richton

Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes rust-lang#41569.  r? @alexcrichton
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 12, 2017
…richton

Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes rust-lang#41569.  r? @alexcrichton
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 12, 2017
…richton

Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes rust-lang#41569.  r? @alexcrichton
bors added a commit that referenced this issue May 15, 2017
Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes #41569.  r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants