-
Notifications
You must be signed in to change notification settings - Fork 888
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
[unstable option] format_generated_files
#5080
Comments
The latest rust version made false the default, but it's still unstable. I think it's inconsistent to have this as an unstable option if the extra code that this feature represents is now enabled by default. |
Thanks for reaching out @Ten0, could you expand a bit on your use case? IIUC, you've been inserting |
We've been using Diesel CLI to generate
Because rustfmt now doesn't format these files anymore, all our patch files don't work anymore (they are based on formatted file and not un-formatted file, which is desired), hence our CI/CD broke. Our current workaround will obviously be to patch the outputs of the diesel CLI to remove the |
Gotcha, thanks for confirming. We do need to get the default updated because we inverted the option itself to avoid double negatives but failed to make the corresponding update to the default. However, I'm not sure whether that'll warrant a 1.58.1 patch release (will check with the release team though) Here's some tactical alternatives that should be available to you already:
|
This will work great as a workaround for now. Thanks! :) |
…es, r=Mark-Simulacrum resolve rustfmt issue with generated files Discussed in https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E58.20patch.20release refs rust-lang/rustfmt#5080 (comment) and rust-lang/rustfmt#5172 updating in-tree vs. subtree sync to make backporting easier, would like to nominate backporting to both beta/1.59 as well as the 1.58.1 patch release
Perhaps another thing to consider in terms of promoting this to stable is if we want to bundle it with #5658, the ability to configure the number of header lines that rustfmt will look for for @generated in. |
Is there a technical reason this is ignored for stdin? |
Yes, at least in so far as current state behavior. See #5172 and Lines 79 to 81 in a3b2bfc
|
@calebcartwright is there an issue or something somewhere else that tracks the stdin support that I can upvote? It would be nice if format-on-save in VS Code would ignore files tagged with |
Not that I'm aware of, I believe it's just a known issue that would need to be resolved in order for this option to potentially be stabilized |
Tracking issue for unstable option: format_generated_files.
See Processes.md, "Stabilising an Option":
The text was updated successfully, but these errors were encountered: