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

Rollup of 5 pull requests #42173

Closed
wants to merge 24 commits into from
Closed

Rollup of 5 pull requests #42173

wants to merge 24 commits into from

Conversation

kennytm and others added 24 commits May 17, 2017 16:09
* rust-lang#42007 happens because the Session LintStore is emptied when linting.
* The Session LintStore is emptied because the checker (Early/LateContext)
  wants ownership.
* The checker wants ownership because it wants to mutate the pass objects
  and lint levels.

The ownership of the whole store is not essential, only the lint levels and
pass objects need to be owned. Therefore, these parts are extracted out of
the LintStore into a separate structure `LintSession`. The "check crates"
methods can operate on `&mut LintSession` instead of `&mut LintStore`.

This is a minor BREAKING CHANGE for lint writers since the `LintContext`
trait is changed: the `mut_lints` and `level_stack` methods are removed.
But no one outside of `librustc/lint/context.rs` is using these functions,
so it should be safe.
Also, improve the split mechanism to address space in paths.
only create source tarball for the Dist subcommand
mark install rule as default for Kind::Install
split install-docs
split install-std
factor out empty_dir handling
split install-cargo
split install-analysis
split install-src
rework install-rustc
properly handle cross-compilation setups for install
use pkgname in install
split plain source tarball generation from rust-src dist
document src-tarball in config.toml.exmaple

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Change some notes into suggestions

r? @petrochenkov since you commented on the same edits in rust-lang#39458
…t-id, r=nikomatsakis

Refactor: Move the mutable parts out of LintStore. Fix rust-lang#42007.

* rust-lang#42007 happens because the `Session` `LintStore` is emptied when linting.
* The `Session` `LintStore` is emptied because the checker (`Early`/`LateContext`) wants ownership.
* The checker wants ownership because it wants to mutate the pass objects and lint levels.

The ownership of the whole store is not essential, only the lint levels and pass objects need to be owned. Therefore, these parts are extracted out of the `LintStore` into a separate structure `LintSession`. The "check crates" methods can operate on `&mut LintSession` instead of `&mut LintStore`.

This is a minor *breaking change* for lint writers since the `LintContext` trait is changed: the `mut_lints` and `level_stack` methods are removed. But no one outside of `librustc/lint/context.rs` is using these functions, so it should be safe.
…idanhs

Use the improved submodule handling

r? @alexcrichton

That was a crap...
```
Updating submodules
Traceback (most recent call last):
  File "./x.py", line 20, in <module>
    bootstrap.main()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 684, in main
    bootstrap()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 662, in bootstrap
    rb.update_submodules()
  File "/home/ishitatsuyuki/Documents/rust/src/bootstrap/bootstrap.py", line 566, in update_submodules
    path = line[1:].split(' ')[1]
TypeError: a bytes-like object is required, not 'str'
```

Maybe we need to confirm the compatibility of git options, such as `git config` or `git -C` (I believe they existed long before, though). This is tested locally.
trace_macro: Show both the macro call and its expansion. rust-lang#42072.

See rust-lang#42072 for the initial motivation behind this.

The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
rustbuild: don't create a source tarball when installing

This splits Install out of Dist as it is not a full dist anymore, and creates the source tarball only for the Dist command.
This will allow splitting install in a few rules if we want as it's done for other phases.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@frewsxcv
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented May 23, 2017

📌 Commit 61e9ff9 has been approved by frewsxcv

@bors
Copy link
Contributor

bors commented May 23, 2017

⌛ Testing commit 61e9ff9 with merge c36666f...

@bors
Copy link
Contributor

bors commented May 23, 2017

💔 Test failed - status-travis

@arielb1 arielb1 added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 23, 2017
@arielb1 arielb1 closed this May 23, 2017
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.