17348 Commits

Author SHA1 Message Date
Ed Page
705c4f1cae chore(ci): Don't check cargo against beta channel
We already only partially check it and it has been a source of false
positives.

While there is trust in the job, contributors and maintainers go into
the job assuming there is a problem and it takes time to break that
assumption.

If we lose trust in the job, we then won't trust it when it fails for
other reasons.

This also increases the risk of us not seeing other problems
`bump-checks` is meant to find if the steps in the job get re-arranged
to make this one of the early ones.
2024-04-29 09:05:33 -05:00
bors
b74573b8fb Auto merge of #13823 - weihanglo:version-bump, r=epage
Bump to 0.81.0; update changelog
2024-04-29 13:28:45 +00:00
Weihang Lo
f1c5693aef
Update changelog for 1.80.0 2024-04-28 23:58:04 -04:00
Weihang Lo
0ee2a330d2
Update changelog for 1.79.0 2024-04-28 23:57:56 -04:00
Weihang Lo
910efc4d23
Bump to 0.81.0 2024-04-28 23:57:55 -04:00
bors
cbca426209 Auto merge of #13816 - rukai:bindep_cargo_tree_panic_test, r=weihanglo
Add failing test: artifact_dep_target_specified

This PR pulls the failing test out of https://github.com/rust-lang/cargo/pull/13207

[During review](https://github.com/rust-lang/cargo/pull/13207#discussion_r1543463395), it was requested there be a previous commit with a failing test.
It will be a while before I have the time to address the other issues with the PR, so I figured for now we should land this failing test first.
2024-04-28 13:17:55 +00:00
Lucas Kent
4079305704 Add failing test: artifact_dep_target_specified 2024-04-28 17:49:16 +10:00
bors
eee4ea2f5a Auto merge of #13812 - Muscraft:dont-always-inherit-workspace-lints, r=epage
fix(cargo-lints): Don't always inherit workspace lints

When working on changes for #13805, I noticed that we always passed the contents of `[workspace.lints.cargo]` into the currently implemented lints,  even if `[lints]` was not specified or did not contain `workspace = true`. This PR makes it so we only pass in the workspace cargo lints if `[lints]` contains `workspace = true`.

You can verify this change by looking at the first commit, where I added a test showing the current behavior, and looking at the second commit and seeing the test output no longer shows a warning about specifying `im-a-teapot`.
2024-04-27 00:56:12 +00:00
bors
c4e19cc890 Auto merge of #13811 - ehuss:remove-sleep-test, r=weihanglo
Update SleepTraker returns_in_order unit test

This updates the `returns_in_order` SleepTracker unit test so that it is not so sensitive to how fast the system is running. Previously it assumed that the function calls would take less than a millisecond to finish, but that is not a valid assumption for a slow-running system.

I have changed it to simplify the test, with the assumption that it takes less than 30 seconds for it to run, which should have a safety margin of a few orders of magnitude.
2024-04-26 23:30:40 +00:00
Eric Huss
06fb65e753 Update SleepTraker returns_in_order unit test 2024-04-26 16:02:09 -07:00
Scott Schafer
cf197fc499
fix(cargo-lints): Don't always inherit workspace lints 2024-04-26 16:37:41 -06:00
Scott Schafer
c3b104e11e
test(cargo-lints): Show workspace lints always inherited 2024-04-26 16:26:36 -06:00
bors
b60a155515 Auto merge of #13804 - epage:underscore, r=weihanglo
fix(toml): Remove underscore field support in 2024

### What does this PR try to resolve?

This is part of the 2024 Edition and is part of rust-lang/rust#123754 and #13629

### How should we test and review this PR?

### Additional information
2024-04-26 16:37:29 +00:00
Ed Page
8ab7683f93 refactor(fix): Be consistent in fix tracking 2024-04-26 10:57:50 -05:00
Ed Page
57b4ab90a6 refactor(toml): Consolidate field name conversion 2024-04-26 10:53:28 -05:00
bors
1dadee6d8b Auto merge of #13808 - weihanglo:buildscript-msrv, r=epage
fix: emit 1.77 syntax error only when msrv is incompatible
2024-04-26 13:49:34 +00:00
Weihang Lo
ba5ec686f9
fix: emit 1.77 syntax error only when msrv is incompatible 2024-04-26 09:30:26 -04:00
Weihang Lo
f70bfd3f4a
test: emit 1.77 syntax error only when msrv is incompatible 2024-04-26 09:01:56 -04:00
bors
e91b58d252 Auto merge of #13794 - epage:workspace, r=weihanglo
docs(ref): Index differences between virtual / real manifests

### What does this PR try to resolve?

For a user to read the reference and to understand when each type of workspace might be right for them, they have to know to also read the section on Package Selection.

This reframes the section on needing to set `resolver = "2"` to being about differences when there isn't a root package and extends it to summarize a part of Package Selection, linking out to it. The hope is that this will make it all of the differences more discoverable without retreading too much of the same ground within Reference-style documentation.

Part of #13580

### How should we test and review this PR?

### Additional information

r? `@weihanglo`
2024-04-25 22:21:37 +00:00
Ed Page
5f5e0fc504 docs(ref): Index differences between virtual / real manifests
For a user to read the reference and to understand when each type of
workspace might be right for them, they have to know to also read the
section on Package Selection.

This reframes the section on needing to set `resolver = "2"` to being
about differences when there isn't a root package and extends it to
summarize a part of Package Selection, linking out to it.
The hope is that this will make it all of the differences more
discoverable without retreading too much of the same ground within
Reference-style documentation.

Part of #13580
2024-04-25 14:33:39 -05:00
Ed Page
50adf47c18 docs(ref): Add a caution about default-members with root package 2024-04-25 14:31:49 -05:00
Ed Page
2289026d70 docs(ref): Move default-members defalting to default-members
This also tweaks the wording to be clear that `default-members` always
apply in the workspace root, not just for virtual workspaces.
2024-04-25 14:31:27 -05:00
Ed Page
58415ff288 docs(ref): Clarify default-members and members relationship
The old statement that its a subset of `members` is incorrect because
some members can be inferred and not show up in `members`.

I tried to reword this to better convey the goal of what was being said
2024-04-25 14:27:37 -05:00
Ed Page
0b15bef075 docs(ref): Simplify default-members wording
This will make it easier to make future changes
2024-04-25 14:10:38 -05:00
Ed Page
6a213f792e docs(ref): Don't call out default-members is optional
Nothing else in the files does despite it all being optional and this
will be clearer in a follow up when I specify the defaults.
2024-04-25 14:09:26 -05:00
Ed Page
a71b8fecf3 feat(fix): Migrate underscore toml fields 2024-04-25 13:22:06 -05:00
bors
cb1123f4f2 Auto merge of #13802 - weihanglo:refactor, r=epage
refactor(toml): extract dependency-to-source-id to function
2024-04-25 17:51:14 +00:00
Ed Page
bcf032e5be test(fix): Show underscore field migration 2024-04-25 12:44:53 -05:00
Weihang Lo
d855cd634a
refactor(toml): remove unnecessary ? operators 2024-04-25 13:27:58 -04:00
Weihang Lo
7ed7612a79
refactor(toml): format arg captures 2024-04-25 13:27:58 -04:00
Weihang Lo
4b0fac9c05
refactor(toml): make match patterns explicit 2024-04-25 13:27:57 -04:00
Weihang Lo
cc7fcaf57c
refactor(toml): move git and patch conflict to separate match arm 2024-04-25 13:27:57 -04:00
Weihang Lo
3505b05792
refactor(toml): show name with underscore for readability 2024-04-25 13:27:57 -04:00
Weihang Lo
a5d2a1d3dc
refactor(toml): extract dependency-to-source-id to function 2024-04-25 13:27:57 -04:00
bors
93edfb9206 Auto merge of #13801 - Muscraft:add-lint-reason, r=epage
Add where lint was set

`rustc` and `clippy` both show why the lint was emitted and where the level was set the first time it was emitted for a package. We already showed why the list was being emitted but did not show where the lint level was set. This PR adds where the lint was set at.
2024-04-25 17:22:07 +00:00
Ed Page
aecb40baac fix(toml): Remove underscore field support in 2024
This is part of the 2024 Edition and is part of rust-lang/rust#123754 and #13629
2024-04-25 11:56:32 -05:00
Scott Schafer
dfc9bd2068
feat(lints): Add where lint level was set 2024-04-24 14:57:36 -06:00
Scott Schafer
d5bc35d844
refactor(lints): Keep workspace and package lints separate 2024-04-24 14:52:45 -06:00
Scott Schafer
2655b069c6
test(cargo-lints): Add a test for workspace inheritance 2024-04-24 14:48:48 -06:00
Scott Schafer
b83c0a4939
refactor(cargo-lints): Cleanup getting the level for a lint 2024-04-24 14:48:38 -06:00
bors
955503e1de Auto merge of #13800 - epage:u3, r=weihanglo
fix(toml): Don't double-warn when underscore is used in workspace dep

### What does this PR try to resolve?

This is prep for removing them in the 2024 Edition and is part of rust-lang/rust#123754 and #13629

Particularly, I wanted to make sure I didn't make things worse and in doing so found there was room for improvement.

### How should we test and review this PR?

### Additional information
2024-04-24 20:25:10 +00:00
bors
e3d42b6019 Auto merge of #13798 - epage:underscore, r=weihanglo
fix(toml): Be more forceful with underscore/dash redundancy

### What does this PR try to resolve?

This is prep for removing them in the 2024 Edition and is part of rust-lang/rust#123754 and #13629

During #13783, I had considered making the 2024 edition behavior a "unused key" warning.  However, the work and code mess to pipe the data through correctly handle the two fields in all cases didn't seem worth it (and a hard error might be better to help users transition).

### How should we test and review this PR?

### Additional information
2024-04-24 19:55:43 +00:00
Ed Page
751fd47d34 fix(toml): Don't double-warn when underscore is used in workspace dep 2024-04-24 14:22:23 -05:00
Ed Page
4cc82833bd test(toml): Show default_features warning for workspace dependencies 2024-04-24 13:51:31 -05:00
Ed Page
b81f94a8e9 refactor(toml): Move underscore validation to resolving 2024-04-24 13:32:04 -05:00
bors
52dae0c1f6 Auto merge of #13793 - ijackson:symlink, r=epage
Fix warning suppression for config.toml vs config compat symlinks

### What does this PR try to resolve?

Background: the cargo config file is being renamed from `.cargo/config` to `.cargo/config.toml`.  There's code in new cargo to look for both files (for compatibility), to issue a warning when onliy the old filename is found, and also to issue a warning if both files are found.  The warning suggests making a symlink if compatibility with old cargo is wanted.

An attempt was made to detect when both the old and new files exists, but one is a symlink to the other, but as reported in #13667, this code is not effective.  (It would work only if the symlink had the precise absolute pathname that cargo has decided to use for the lookup, which would be an unnatural way to make the link.)

Logically, the warning should appear when both files exist *but are different*.  That is the anomalous situation that will generate confusing behaviour.   By "different" we ought to mean "aren't the very same file".

That's what this MR implements, where possible.  On Unix, we use the information from stat(2).  That's not available on other platforms; on those, we arrange to also tolerate a symlink referring to precisely `config.toml` as a relative pathname, which is also fine, since by definition the target is then in the same directrory as `config`.

Fixes #13667.

### How should we test and review this PR?

I have interleaved the new tests with the commits that support them.  In each case, a functional commit is followed by a test which fails just beforehand.

(This can be observed by experimentally reordering the branch.)

I have also done ad-hoc testing.

### Additional information

I'm making the assumption that a symlink containing a relative path does something sane on Windows.  This assumption may be unwarranted.  If so, "Handle `config` -> `config.toml` (without full path)" needs to be dropped, and the test case needs to be `#[cfg(unix)]`.

But also, in this case, we should probably put some warnings in the stdlib docs!
2024-04-24 17:36:34 +00:00
bors
70fb498994 Auto merge of #13797 - Muscraft:cleanup-linting-system, r=epage
Cleanup linting system

There are a number of problems with the current linting system, most notably that lints could run without `-Zcargo-lints` being set. This PR fixes that issue and a few others that are low-hanging fruit.
2024-04-24 16:31:40 +00:00
Ian Jackson
2f16838385 config reading: use same_file for suppressing "both files" warning (fmt)
Apply deferred indentation changes.  Whitespace change only.
2024-04-24 15:28:09 +01:00
Ian Jackson
23440c0dcd config reading: use same_file for suppressing "both files" warning
This is 100% reliable on Unix, and better on Windows.

(In this commit I avoid reindenting things to make review easier; the
formatting will be fixed in the next commit.)

Fixes #13667
2024-04-24 15:28:08 +01:00
Ian Jackson
91f3e457ab Tests: Add test case for config.toml -> config 2024-04-24 11:45:58 +01:00