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

Concentrate formatter changes in next release #13002

Open
16 tasks
straight-shoota opened this issue Jan 25, 2023 · 9 comments
Open
16 tasks

Concentrate formatter changes in next release #13002

straight-shoota opened this issue Jan 25, 2023 · 9 comments

Comments

@straight-shoota
Copy link
Member

straight-shoota commented Jan 25, 2023

We're frequently merging formatter changes, but usually it's tiny bug fixes for edge cases that don't affect much code.

With #12951 we have a formatter change in the development branch that will affect quite a lot of code bases.
I think it would be a good chance to introduce other impactful formatter changes in the same release. This would concentrate these changes in a single release and users don't need to constantly reformat their code bases. It's easier to do all changes A, B, C all in one go for release 1.8 instead of A in 1.8, B in 1.9 C in 1.10 etc.

These are some formatter changes pending implementation that I could find in the issue tracker:

Ready for enabling

We probably won't be able to address all for the next release, but we should try to focus at least on some of them.

@beta-ziliani
Copy link
Member

An alternative could be to add each as opt-in, and at some point turn them all by default

@straight-shoota
Copy link
Member Author

Considering that the 1.8 release is approaching soon and we have had no progress on any other changes, it's probably best to delay the release of formatter changes.

We should disable the changes from #12951 by default for 1.8.
They can be available behind a flag.

@beta-ziliani
Copy link
Member

Let's add a preview flag to stuff in there all the stuff coming in a future release

@HertzDevil
Copy link
Contributor

The formatter does not actually support -D flags right now. If we want to hide things behind a flag without "implementing" flags themselves for 1.8 it seems our only option is an environment variable

@straight-shoota
Copy link
Member Author

straight-shoota commented Mar 22, 2023

Yeah, I was planning to first implement it with an internal flag only. This allows us to keep the specs running. We can still consider exposing it in the CLI, but that would be a separate step.

But let's continue this thread in a separate discussion, this issue should be about coordinating formatter changes, not implementation details.

@HertzDevil
Copy link
Contributor

HertzDevil commented Mar 24, 2023

If we have multiple formatter changes but they are still not enough, do we have just a single flag for all of them, or individual flags? If it's the former it could be -Dpreview_formatter

@beta-ziliani
Copy link
Member

I was thinking in just one flag

@straight-shoota
Copy link
Member Author

straight-shoota commented Mar 24, 2023

Specific flags have some use internally as it clearly denotes what parts of the code belong to that feature. That's how #13215 works.
If we expose preview mode in the CLI, I would only use a single flag to enable all available preview features.

@straight-shoota
Copy link
Member Author

straight-shoota commented Jan 2, 2024

In #14158 (comment) @Blacksmoke16 brought up that we probably shouldn't wait for all these issues to be fixed.
And yeah, this list is just meant to collect formatter changes for the purpose of grouping them.

I'm not sure what should drive the decision to enable all pending formatter changes.
The idea of this to avoid the invonvenience of formatter changes in every single release. But it's not meant to hold up improvements indefinitely. The initial expectation was these would be implemented much faster. 😅

#12951 for example has been merged for a year now. I think it outta be time for it to actually roll out.
#13169 is also ready. So we can take those two for now.

I wouldn't want to do this for 1.11 though because we're already in the freeze period.
But let's schedule their activation for 1.12. And perhaps we can get a couple more PRs going til then.

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

No branches or pull requests

3 participants