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

Stabilize ignore config option #4139

Merged
merged 1 commit into from
May 24, 2020

Conversation

topecongiro
Copy link
Contributor

Close #3243.

@@ -1063,7 +1063,7 @@ The pattern format is the same as [.gitignore](https://git-scm.com/docs/gitignor

- **Default value**: format every file
- **Possible values**: See an example below
- **Stable**: No (tracking issue: [#3395](https://github.com/rust-lang/rustfmt/issues/3395))
- **Stable**: Yes
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should fix #3881 before stabilizing this? Or shall we go ahead and stabilize but treat #3881 as bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I will fix that first. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#3881 is fixed by #4179.

@calebcartwright
Copy link
Member

CI failures are spurious, presumably related to the current GH status issues

error: failed to get `ansi_term` as a dependency of package `rustfmt-bin v2.0.0-rc.1 (/Users/travis/build/rust-lang/rustfmt/rustfmt-core/rustfmt-bin)`

Caused by:

  failed to load source for dependency `ansi_term`

Caused by:

  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:

  failed to fetch `https://github.com/rust-lang/crates.io-index`

@topecongiro topecongiro merged commit a4cd6ae into rust-lang:master May 24, 2020
@topecongiro topecongiro deleted the stabilize-ignore branch May 24, 2020 03:29
bradleypmartin pushed a commit to bradleypmartin/rustfmt that referenced this pull request May 25, 2020
@kpcyrd
Copy link

kpcyrd commented May 21, 2021

Should this work by now?

% cargo --version
cargo 1.52.0 (69767412a 2021-04-21)
% rustfmt --version
rustfmt 1.4.36-stable (7de6968 2021-02-07)
% cat .rustfmt.toml 
ignore = [
    "src/schema.rs"
]
% cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/schema.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
Warning: can't set `ignore = IgnoreList { path_set: {"src/schema.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
% 

@misha
Copy link

misha commented May 24, 2021

Can confirm the same error with a slightly older version, too.

$ cargo -V
cargo 1.50.0 (f04e7fab7 2021-02-04)
$ rustfmt -V
rustfmt 1.4.30-stable (8c6769d 2021-01-18)
$ cat rustfmt.toml 
ignore = [
    "src/kbn_constants.rs",
]
$ cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/kbn_constants.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

@cloutiertyler
Copy link

Same here:

$ cargo -V
cargo 1.52.0 (69767412a 2021-04-21)
$ rustfmt -V
rustfmt 1.4.36-stable (7de6968e 2021-02-07)
$ cat .rustfmt.toml
ignore = [
    "src/messages/test.rs",
]
$ cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/messages/test.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

@nlhepler
Copy link

nlhepler commented Jul 27, 2021

Was this commit excised from master after commit? I cannot find it in the master branch history, or in the contents of the files this PR was supposed to change.

@QAston
Copy link

QAston commented Oct 26, 2021

I have the same issue in august releases

@ahirner
Copy link

ahirner commented Oct 30, 2021

Issue persisted in:

$ cargo -V
cargo 1.56.0 (4ed5d137b 2021-10-04)
$ rustfmt -V
rustfmt 1.4.37-stable (09c42c45 2021-10-18)

@calebcartwright
Copy link
Member

All - your definitive source of truth around which rustfmt configuration options are available, as well as which are stable/unstable, in the version of rustfmt you are using is the configuration website: https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#ignore

Changes made to source control are not reflective of any and all released versions of software, especially in multibranch repositories, and the ignore option is still unstable in all released versions of rustfmt.

This change was originally made against an exploratory 2.0 version of rustfmt along with a multitude of other breaking changes. That 2.0 version of rustfmt is unlikely to happen (at least any time soon), and as such that version is no longer being tracked on the default/master branch of this repository which is why the commits from this, and other 2.0-bound PRs do not exist on the current master branch, refs #4801. It also means that there are merged PRs and associated closed issues which haven't actually made their way into a release line.

There's a large number of such changes that were made for that potential 2.0 release which we have to revisit individually, including this one, and I'd ask that folks refrain from continuing to post the "me too" types of comments; it's known, and the issues are being tracked.

In the interim, I would again encourage always referencing the config site and check the actual release notes for details on what's indeed been released.

@rdaum
Copy link

rdaum commented Feb 20, 2024

This remains broken in 2024.

Warning: can't set `ignore = IgnoreList { path_set: {"submodules"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
...
rustfmt 1.7.0-stable (07dca48 2024-02-04)
...
active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.76.0 (07dca489a 2024-02-04)

@ytmimi
Copy link
Contributor

ytmimi commented Feb 20, 2024

@rdaum please see #3243 (comment)

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

Successfully merging this pull request may close these issues.

Stabilize the ignore configuration