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

tidy: make rustc dependency error less confusing #102468

Merged
merged 2 commits into from
Sep 29, 2022
Merged

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 29, 2022

The current wording leads to very confusing messages:

tidy error: Dependencies for main workspace not explicitly permitted:
* unicode-ident 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)

Miri is part of that workspace, and there never was a problem adding Miri dependencies. The actual error is that due to a crate bump this now showed up as a rustc dependency, and those are restricted.

@rust-highfive
Copy link
Collaborator

r? @jyn514

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2022
@RalfJung
Copy link
Member Author

RalfJung commented Sep 29, 2022

(FWIW, the function names here are not very helpful. check_dependencies sounds like it could be the function that checks the licenses of all dependencies, but it isn't. The license checking function is called check_exceptions...)

@jyn514
Copy link
Member

jyn514 commented Sep 29, 2022

Miri is part of that workspace, and there never was a problem adding Miri dependencies. The actual error is that due to a crate bump this now showed up as a rustc dependency, and those are restricted.

This doesn't match my reading of the code. It runs cargo metadata from the top level directory, which shows all dependencies in the workspace, no?

@RalfJung
Copy link
Member Author

Yeah I had to read the code 3 times to figure out what happens.

It only checks the dependencies of RESTRICTED_DEPENDENCY_CRATES, which is only rustc.

@jyn514
Copy link
Member

jyn514 commented Sep 29, 2022

The new names make the code a lot easier to understand, thanks :)

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 29, 2022

📌 Commit 79ad594 has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 29, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 29, 2022
tidy: make rustc dependency error less confusing

The current wording leads to very confusing messages:
```
tidy error: Dependencies for main workspace not explicitly permitted:
* unicode-ident 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)
```
Miri is part of that workspace, and there never was a problem adding Miri dependencies. The actual error is that due to a crate bump this now showed up as a rustc dependency, and *those* are restricted.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 29, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#102214 (Fix span of byte-escaped left format args brace)
 - rust-lang#102426 (Don't export `__wasm_init_memory` on WebAssembly.)
 - rust-lang#102437 (rustdoc: cut margin-top from first header in docblock)
 - rust-lang#102442 (rustdoc: remove bad CSS font-weight on `.impl`, `.method`, etc)
 - rust-lang#102447 (rustdoc: add method spacing to trait methods)
 - rust-lang#102468 (tidy: make rustc dependency error less confusing)
 - rust-lang#102476 (Split out the error reporting logic into a separate function)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit af33587 into rust-lang:master Sep 29, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 29, 2022
@RalfJung RalfJung deleted the tidy branch September 30, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants