Skip to content

Conversation

joshka
Copy link
Contributor

@joshka joshka commented Dec 1, 2023

Instead of {filename} at {line}, use {filename}:{line} as this is a
format that many editors allow to be clicked to navigate directly to the
line.


This is a small papercut issue. I like being able to Cmd+Click a filename and navigate directly to the problematic code when I'm running rustfmt check.

@ytmimi
Copy link
Contributor

ytmimi commented Jan 25, 2024

Thanks! I've tested this out in VSCode and it works! Just wondering, does it make sense to leave the trailing colon :?

@joshka
Copy link
Contributor Author

joshka commented Jan 25, 2024

Thanks! I've tested this out in VSCode and it works! Just wondering, does it make sense to leave the trailing colon :?

I can take it or leave it on that. The colon indicates that this message belongs to the following error, so I think it's worthwhile. That said, build errors from cargo build / rustc don't have the colon (but they do have some shiny colors to highlight the line with the clickable file link.

The other thing worth considering here is whether to drop the full path and just leave the project root path e.g. compare:

[cargo-make] INFO - Execute Command: "rustup" "run" "nightly" "cargo" "fmt" "--all" "--check"
Diff in /Users/joshka/local/ratatui/src/backend/crossterm.rs at line 17:
 };
...

vs:

   Compiling ratatui v0.25.0 (/Users/joshka/local/ratatui)
error[E0433]: failed to resolve: use of undeclared crate or module `scrate`
  --> src/backend/crossterm.rs:19:5

You might also consider changing the message to be more explicit about what the diff represents to make it clearer to newer contributors when the format check is called deep in some CI process.

e.g. something like:

error: Formatting check failed at src/backend/crossterm.rs:17. Diff:
...
run `<full command line without the --check>` to fix these changes

@ytmimi
Copy link
Contributor

ytmimi commented Jan 25, 2024

I can take it or leave it on that. The colon indicates that this message belongs to the following error, so I think it's worthwhile.

Okay, cool. I'm fine with leaving it 👍🏼

but they do have some shiny colors to highlight the line with the clickable file link

We produce colored output for our internal errors, when you have the right setting enabled. To test that out you can run

rustfmt --config=max_width=15,error_on_line_overflow=true <<< 'fn main() { println!("hello world!"); }'
Screen Shot 2024-01-25 at 11 10 23 AM

The other thing worth considering here is whether to drop the full path

I've thought about that before. I think it's a chance I'd like to make a some point, but not in this PR.

You might also consider changing the message to be more explicit about what the diff represents to make it clearer to newer contributors when the format check is called deep in some CI process.

Thank you for the suggestion. I'll think on it. For now I'd like to keep the message as is.

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After our discussion I'm feeling good about making this change.

@ytmimi ytmimi added release-notes Needs an associated changelog entry and removed pr-waiting-on-author labels Jan 25, 2024
Instead of {filename} at {line}, use {filename}:{line} as this is a
format that many editors allow to be clicked to navigate directly to the
line.
@ytmimi ytmimi force-pushed the format-diff-filename branch from f17fa0a to a0bc431 Compare January 25, 2024 16:14
@ytmimi ytmimi merged commit 7f44a08 into rust-lang:master Jan 25, 2024
@joshka joshka deleted the format-diff-filename branch January 25, 2024 18:20
@ytmimi ytmimi removed the release-notes Needs an associated changelog entry label Jul 6, 2024
jonasbb added a commit to actions-rust-lang/setup-rust-toolchain that referenced this pull request Oct 1, 2024
denialhaag pushed a commit to munich-quantum-toolkit/naviz that referenced this pull request Sep 23, 2025
…#202)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://redirect.github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions-rust-lang/setup-rust-toolchain](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain)
| action | minor | `v1` -> `v1.15.0` |

---

### Release Notes

<details>
<summary>actions-rust-lang/setup-rust-toolchain
(actions-rust-lang/setup-rust-toolchain)</summary>

###
[`v1.15.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.15.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.14.1...v1.15.0)

##### What's Changed

- Bump actions/checkout from 4 to 5 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;71](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/71)
- README should direct users to actions/checkout\@&#8203;5. by
[@&#8203;martinfrances107](https://redirect.github.com/martinfrances107)
in
[#&#8203;72](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/72)
- enhancement: Add option to specify rust-toolchain.toml path by
[@&#8203;Kubaryt](https://redirect.github.com/Kubaryt) in
[#&#8203;69](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/69)

##### New Contributors

-
[@&#8203;martinfrances107](https://redirect.github.com/martinfrances107)
made their first contribution in
[#&#8203;72](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/72)
- [@&#8203;Kubaryt](https://redirect.github.com/Kubaryt) made their
first contribution in
[#&#8203;69](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/69)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.14.1...v1.15.0>

###
[`v1.14.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.14.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.14.0...v1.14.1)

##### What's Changed

- Pin `Swatinem/rust-cache` action to a full commit SHA by
[@&#8203;JohnTitor](https://redirect.github.com/JohnTitor) in
[#&#8203;68](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/68)

##### New Contributors

- [@&#8203;JohnTitor](https://redirect.github.com/JohnTitor) made their
first contribution in
[#&#8203;68](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/68)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.14.0...v1.14.1>

###
[`v1.14.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.14.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.13.0...v1.14.0)

##### What's Changed

- Add new parameters `cache-all-crates` and `cache-workspace-crates`
that are propagated to `Swatinem/rust-cache` as `cache-all-crates` and
`cache-workspace-crates`
Solves
[#&#8203;67](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/67)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.13.0...v1.14.0>

###
[`v1.13.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.13.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.12.0...v1.13.0)

##### What's Changed

- feat: support cache-provider by
[@&#8203;mindrunner](https://redirect.github.com/mindrunner) in
[#&#8203;65](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/65)

##### New Contributors

- [@&#8203;mindrunner](https://redirect.github.com/mindrunner) made
their first contribution in
[#&#8203;65](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/65)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.12.0...v1.13.0>

###
[`v1.12.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.12.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.11.0...v1.12.0)

##### What's Changed

- Support rustup installation for Windows by
[@&#8203;maennchen](https://redirect.github.com/maennchen) in
[#&#8203;58](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/58)

##### New Contributors

- [@&#8203;maennchen](https://redirect.github.com/maennchen) made their
first contribution in
[#&#8203;58](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/58)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1...v1.12.0>

###
[`v1.11.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.11.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.10.1...v1.11.0)

##### What's Changed

- feat: add shared-cache-key to inputs by
[@&#8203;skanehira](https://redirect.github.com/skanehira) in
[#&#8203;52](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/52)
- fix: add cache-bin input with true as default value by
[@&#8203;enkhjile](https://redirect.github.com/enkhjile) in
[#&#8203;51](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/51)
- chore: prepare release 1.11.0 by
[@&#8203;robjtede](https://redirect.github.com/robjtede) in
[#&#8203;53](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/53)

##### New Contributors

- [@&#8203;skanehira](https://redirect.github.com/skanehira) made their
first contribution in
[#&#8203;52](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/52)
- [@&#8203;enkhjile](https://redirect.github.com/enkhjile) made their
first contribution in
[#&#8203;51](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/51)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1...v1.11.0>

###
[`v1.10.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.10.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.10.0...v1.10.1)

- Fix problem matcher for rustfmt output.
The format has changed since
[rust-lang/rustfmt#5971](https://redirect.github.com/rust-lang/rustfmt/pull/5971)
and now follows the form "filename:line".
Thanks to [@&#8203;0xcypher02](https://redirect.github.com/0xcypher02)
for pointing out the problem.

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1...v1.10.1>

###
[`v1.10.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.10.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.9.0...v1.10.0)

##### What's Changed

- Add new parameter cache-directories that is propagated to
Swatinem/rust-cache
([#&#8203;44](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/44)
by
[@&#8203;pranc1ngpegasus](https://redirect.github.com/pranc1ngpegasus))
- Add new parameter cache-key that is propagated to Swatinem/rust-cache
as key
([#&#8203;41](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/41)
by [@&#8203;iainlane](https://redirect.github.com/iainlane))
- Make rustup toolchain installation more robust in light of planned
changes
[rust-lang/rustup#3635](https://redirect.github.com/rust-lang/rustup/issues/3635)
and
[rust-lang/rustup#3985](https://redirect.github.com/rust-lang/rustup/pull/3985)
- Allow installing multiple Rust toolchains by specifying multiple
versions in the toolchain input parameter.
- Configure the rustup override behavior via the new override input.
([#&#8203;38](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/38))

##### New Contributors

- [@&#8203;pranc1ngpegasus](https://redirect.github.com/pranc1ngpegasus)
made their first contribution in
[#&#8203;44](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/44)
- [@&#8203;iainlane](https://redirect.github.com/iainlane) made their
first contribution in
[#&#8203;41](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/41)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1...v1.10.0>

###
[`v1.9.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.9.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.8.0...v1.9.0)

- Add extra argument `cache-on-failure` and forward it to
`Swatinem/rust-cache`.
([#&#8203;39](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/39)
by [@&#8203;samuelhnrq](https://redirect.github.com/samuelhnrq))\
  Set the default the value to true.
  This will result in more caching than previously.
This helps when large dependencies are compiled only for testing to
fail.

###
[`v1.8.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.8.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.7.0...v1.8.0)

- Allow specifying subdirectories for cache.
- Fix toolchain file overriding.

###
[`v1.7.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.7.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6.0...v1.7.0)

##### What's Changed

- Allow overriding the toolchain file by
[@&#8203;Twey](https://redirect.github.com/Twey) in
[#&#8203;26](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26)
- ci: update checked rust-toolchain version by
[@&#8203;robjtede](https://redirect.github.com/robjtede) in
[#&#8203;29](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29)
- Prepare 1.7.0 release by
[@&#8203;robjtede](https://redirect.github.com/robjtede) in
[#&#8203;30](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30)

##### New Contributors

- [@&#8203;Twey](https://redirect.github.com/Twey) made their first
contribution in
[#&#8203;26](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26)
- [@&#8203;robjtede](https://redirect.github.com/robjtede) made their
first contribution in
[#&#8203;29](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.6...v1.7.0>

###
[`v1.6.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.6.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.5.0...v1.6.0)

##### What's Changed

- Allow disabling problem matcher by
[@&#8203;dcvz](https://redirect.github.com/dcvz) in
[#&#8203;27](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/27)
- Add docs for the `cachekey` output to the README by
[@&#8203;obi1kenobi](https://redirect.github.com/obi1kenobi) in
[#&#8203;24](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/24)

##### New Contributors

- [@&#8203;dcvz](https://redirect.github.com/dcvz) made their first
contribution in
[#&#8203;27](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/27)
- [@&#8203;obi1kenobi](https://redirect.github.com/obi1kenobi) made
their first contribution in
[#&#8203;24](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/24)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1.5...v1.6.0>

###
[`v1.5.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/releases/tag/v1.5.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.4...v1.5.0)

##### What's Changed

- Check that listed components and targets are installed even with a
rust-toolchain file by
[@&#8203;jonasbb](https://redirect.github.com/jonasbb) in
[#&#8203;19](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/19)
- allow disabling RUSTFLAGS config by
[@&#8203;JeanMertz](https://redirect.github.com/JeanMertz) in
[#&#8203;18](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18)

##### New Contributors

- [@&#8203;JeanMertz](https://redirect.github.com/JeanMertz) made their
first contribution in
[#&#8203;18](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18)

**Full Changelog**:
<actions-rust-lang/setup-rust-toolchain@v1...v1.5.0>

###
[`v1.4.4`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.3...v1.4.4)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.3...v1.4.4)

###
[`v1.4.3`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.2...v1.4.3)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.2...v1.4.3)

###
[`v1.4.2`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.1...v1.4.2)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.1...v1.4.2)

###
[`v1.4.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.0...v1.4.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.0...v1.4.1)

###
[`v1.4.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.7...v1.4.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.7...v1.4.0)

###
[`v1.3.7`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.6...v1.3.7)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.6...v1.3.7)

###
[`v1.3.6`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.5...v1.3.6)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.5...v1.3.6)

###
[`v1.3.5`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.4...v1.3.5)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.4...v1.3.5)

###
[`v1.3.4`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.3...v1.3.4)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.3...v1.3.4)

###
[`v1.3.3`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.2...v1.3.3)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.2...v1.3.3)

###
[`v1.3.2`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.1...v1.3.2)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.1...v1.3.2)

###
[`v1.3.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.0...v1.3.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.0...v1.3.1)

###
[`v1.3.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.2.1...v1.3.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.2.1...v1.3.0)

###
[`v1.2.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.2.0...v1.2.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.2.0...v1.2.1)

###
[`v1.2.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.1.0...v1.2.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.1.0...v1.2.0)

###
[`v1.1.0`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.0.2...v1.1.0)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.0.2...v1.1.0)

###
[`v1.0.2`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.0.1...v1.0.2)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.0.1...v1.0.2)

###
[`v1.0.1`](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.0.1)

[Compare
Source](https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.0.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/munich-quantum-toolkit/naviz).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnaXRodWItYWN0aW9ucyJdfQ==-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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