Skip to content

Conversation

@weihanglo
Copy link
Member

What does this PR try to resolve?

---- expected: tests/testsuite/lints/implicit_minimum_version_req.rs:716:27
++++ actual:   stderr
   1    1 | [WARNING] dependency version requirement without an explicit minimum version
   2    2 |  --> Cargo.toml:7:[..]
   3    3 |   |
   4      - 7 | bar = { git = '[ROOTURL]/bar', version = "0.1" }
        4 + 7 | ...known-linux-gnu/tmp/cit/t2182/bar', version = "0.1" }
   5    5 |   |                                      [..]^^^^^ missing full version components
   6    6 |   |
   7    7 | [HELP] consider specifying full `major.minor.patch` version components
   8    8 |   |
   9    9 | 7 | bar = { git = '[ROOTURL]/bar', version = "0.1.0" }
  10   10 |   |                                          [..]++
  11   11 |   = [NOTE] `cargo::implicit_minimum_version_req` is set to `warn` in `[lints]`
  12   12 | [UPDATING] git repository `[ROOTURL]/bar`
  13   13 | [LOCKING] 1 package to latest compatible version
  14   14 | [CHECKING] bar v0.1.0 ([ROOTURL]/bar#[..])
  15   15 | [CHECKING] foo v0.0.0 ([ROOT]/foo)
  16   16 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

See rust-lang/rust#149934 (comment)

How to test and review this PR?

r? Muscraft

I wonder if annotate-snippets already has a way to control not omitting for tests (or that is not worthy).

```
---- expected: tests/testsuite/lints/implicit_minimum_version_req.rs:716:27
++++ actual:   stderr
   1    1 | [WARNING] dependency version requirement without an explicit minimum version
   2    2 |  --> Cargo.toml:7:[..]
   3    3 |   |
   4      - 7 | bar = { git = '[ROOTURL]/bar', version = "0.1" }
        4 + 7 | ...known-linux-gnu/tmp/cit/t2182/bar', version = "0.1" }
   5    5 |   |                                      [..]^^^^^ missing full version components
   6    6 |   |
   7    7 | [HELP] consider specifying full `major.minor.patch` version components
   8    8 |   |
   9    9 | 7 | bar = { git = '[ROOTURL]/bar', version = "0.1.0" }
  10   10 |   |                                          [..]++
  11   11 |   = [NOTE] `cargo::implicit_minimum_version_req` is set to `warn` in `[lints]`
  12   12 | [UPDATING] git repository `[ROOTURL]/bar`
  13   13 | [LOCKING] 1 package to latest compatible version
  14   14 | [CHECKING] bar v0.1.0 ([ROOTURL]/bar#[..])
  15   15 | [CHECKING] foo v0.0.0 ([ROOT]/foo)
  16   16 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
```

See rust-lang/rust#149934 (comment)
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2025
@epage
Copy link
Contributor

epage commented Dec 13, 2025

Why did the ROOTURL redaction not apply?

@weihanglo
Copy link
Member Author

Why did the ROOTURL redaction not apply?

I guess the line length exceeds the maxiumum length cap, so annotate-snippet omit the first few characters in the report?

        4 + 7 | ...known-linux-gnu/tmp/cit/t2182/bar', version = "0.1" }

@epage
Copy link
Contributor

epage commented Dec 13, 2025

Oh right. We'd have to extend the diagnostic width

@epage epage added this pull request to the merge queue Dec 13, 2025
Merged via the queue into rust-lang:master with commit 1a3faba Dec 13, 2025
28 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2025
bors added a commit to rust-lang/rust that referenced this pull request Dec 13, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
@rustbot rustbot added this to the 1.94.0 milestone Dec 13, 2025
@ehuss
Copy link
Contributor

ehuss commented Dec 13, 2025

@Muscraft mentioned this in #16121 (review). Would it make sense to set __CARGO_TEST_TTY_WIDTH_DO_NOT_USE_THIS to a very large value by default to avoid problems with being sensitive to the current directory structure? (And if a test needs to exercise it, it can override it to something small.)

@weihanglo
Copy link
Member Author

Sounds reasonable

@weihanglo weihanglo deleted the lint branch December 13, 2025 23:42
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Dec 14, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 15, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
github-merge-queue bot pushed a commit that referenced this pull request Dec 16, 2025
@ehuss [made a
comment](#16391 (comment))
saying that `cargo` should set `__CARGO_TEST_TTY_WIDTH_DO_NOT_USE_THIS
to a very large value to avoid problems with long paths in tests. This
PR does that by setting it to `200` (the previous default was `140`).

Note: `200` is a start, and we can always go up if needed
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.

5 participants