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

Incorrect path printed on error #5463

Open
nazar-pc opened this issue Jul 24, 2022 · 4 comments · May be fixed by #5506
Open

Incorrect path printed on error #5463

nazar-pc opened this issue Jul 24, 2022 · 4 comments · May be fixed by #5506
Labels

Comments

@nazar-pc
Copy link

nazar-pc@nazar-pc:/w/s/subspace> rustfmt --version
rustfmt 1.5.1-nightly (62b272d 2022-07-21)
nazar-pc@nazar-pc:/w/s/subspace> rustfmt --config error_on_line_overflow=true crates/pallet-subspace/src/lib.rs
error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 105)
   --> /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:478:478:101
    |
478 |         #[pallet::weight((<T as Config>::WeightInfo::report_equivocation(), DispatchClass::Operational))]
    |                                                                                                     ^^^^^
    |

error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 128)
   --> /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:493:493:101
    |
493 |         #[pallet::weight((<T as Config>::WeightInfo::store_root_blocks(root_blocks.len()), DispatchClass::Mandatory, Pays::No))]
    |                                                                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |

warning: rustfmt has failed to format. See previous 2 errors.

This is inconvenient when I want to open the file at that line in IDE afterwards.

@ytmimi
Copy link
Contributor

ytmimi commented Jul 27, 2022

Yeah that's odd. Just double checking that you're referring to /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:478:478:101?

@ytmimi ytmimi added the p-low label Jul 27, 2022
@nazar-pc
Copy link
Author

Yes

@calebcartwright
Copy link
Member

Not knowing the ins and outs of your local file system, are you saying that /web/subspace/subspace/crates/pallet-subspace/src/lib.rs is not a correct, absolute path to the file?

@nazar-pc
Copy link
Author

nazar-pc commented Aug 7, 2022

I should have been clearer, the issue is not the path of the file itself, but rather location in the file.

478:478:101 should have been 478:101.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants