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

Binary installer tarballs #12793

Merged
merged 12 commits into from
Mar 11, 2014
Merged

Binary installer tarballs #12793

merged 12 commits into from
Mar 11, 2014

Conversation

brson
Copy link
Contributor

@brson brson commented Mar 9, 2014

Work towards #9876.

Several minor things here:

  • Fix the need_ok function in configure
  • Install man pages with non-executable permissions
  • Use the correct directory for man pages when installing (this was a recent regression)
  • Put all distributables in a new dist/ directory in the build directory (there are soon to be significantly more of these)

Finally, this also creates a new, more precise way to install and uninstall Rust's files, the install.sh script, and creates a build target (currently dist-tar-bins) that creates a binary tarball containing all the installable files, boilerplate and license docs, and install.sh.

This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg).

How install.sh works

  • First, the makefiles (prepare.mk and dist.mk) put all the stuff that needs to be installed in a new directory in dist/.
  • Then it puts install.sh in that same directory and a list of all the files to install at rustlib/manifest.
  • Then the directory can be packaged and distributed.
  • When install.sh runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well.
  • When install.sh runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest.
  • install.sh --uninstall will uninstall Rust

Future work:

  • Modify install.sh to accept --man-dir etc
  • Rewrite install.mk to delegate to install.sh
  • Investigate how install.sh does or doesn't work with .pkg on Mac
  • Modify dist.mk to create .pkg files for all hosts
  • Possibly use makeself to create self-extracting installers
  • Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64.
  • Adjust build system to be able to augment versions with '-nightly'
  • Adjust build system to name dist artifacts without version numbers e.g. rust-nightly-...pkg. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten.
  • Create new dist-nightly builder
  • Give the build master a new cron job to push to dist-nightly every night
  • Add docs to distributables
  • Update README.md to reflect the new reality
  • Modernize the website to promote new installers

bors added a commit that referenced this pull request Mar 11, 2014
Work towards #9876.

Several minor things here:
  * Fix the `need_ok` function in `configure`
  * Install man pages with non-executable permissions
  * Use the correct directory for man pages when installing (this was a recent regression)
  * Put all distributables in a new `dist/` directory in the build directory (there are soon to be significantly more of these)

Finally, this also creates a new, more precise way to install and uninstall Rust's files, the `install.sh` script, and creates a build target (currently `dist-tar-bins`) that creates a binary tarball containing all the installable files, boilerplate and license docs, and `install.sh`.

This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg).

## How `install.sh` works

* First, the makefiles (`prepare.mk` and `dist.mk`) put all the stuff that needs to be installed in a new directory in `dist/`.
* Then it puts `install.sh` in that same directory and a list of all the files to install at `rustlib/manifest`.
* Then the directory can be packaged and distributed.
* When `install.sh` runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well.
* When `install.sh` runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest.
* `install.sh --uninstall` will uninstall Rust

## Future work:

  * Modify `install.sh` to accept `--man-dir` etc
  * Rewrite `install.mk` to delegate to `install.sh`
  * Investigate how `install.sh` does or doesn't work with .pkg on Mac
  * Modify `dist.mk` to create `.pkg` files for all hosts
  * Possibly use [makeself](http://www.megastep.org/makeself/) to create self-extracting installers
  * Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64.
  * Adjust build system to be able to augment versions with '-nightly'
  * Adjust build system to name dist artifacts without version numbers e.g. `rust-nightly-...pkg`. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten.
  * Create new dist-nightly builder
  * Give the build master a new cron job to push to dist-nightly every night
  * Add docs to distributables
  * Update README.md to reflect the new reality
  * Modernize the website to promote new installers
@bors bors closed this Mar 11, 2014
@bors bors merged commit 9523809 into rust-lang:master Mar 11, 2014
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Sep 6, 2022
fix: sort and deduplicate auto traits in trait object types

Fixes rust-lang#12739

Chalk solver doesn't sort and deduplicate auto traits in trait object types, so we need to handle them ourselves in the lowering phase, just like [`rustc`](https://github.com/rust-lang/rust/blob/880416180b0a9ee1141c07d4d17667edb77daebd/compiler/rustc_typeck/src/astconv/mod.rs#L1487-L1488) and [`chalk-integration`](https://github.com/rust-lang/chalk/blob/master/chalk-integration/src/lowering.rs#L575) do.

Quoting from [the Chalk book](https://rust-lang.github.io/chalk/book/types/rust_types.html#dyn-types):

> Note that -- for this purpose -- ordering of bounds is significant. That means that if you create a `dyn Foo + Send` and a `dyn Send + Foo`, chalk would consider them distinct types. The assumption is that bounds are ordered in some canonical fashion somewhere else.

Also, trait object types with more than one non-auto traits were previously allowed, but are now disallowed with this patch.
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Sep 13, 2022
fix: sort all bounds on trait object types

Fixes rust-lang#13181

rust-lang#12793 allowed different ordering of trait bounds in trait object types but failed to account for the ordering of projection bounds. I opted for sorting all the bounds at once rather than splitting them into `SmallVec`s so it's easier to do the same thing for other bounds when we have them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants