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
Request: backporting flat config bug fixes to v8 #17966
Comments
Unfortunately, this is just not something we can do in any reasonably safe way. Our whole release process is based on releasing just one thing and we have never backported fixes to previous versions. We literally don't have the automation to release anything other than Maybe after the final v9 is released someone can investigate how to do this, but it's definitely not something we can do quickly or easily. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I do understand that it's not going to be easy and I appreciate the scope of what I'm asking for here. Considering this is hard blocking us, we could unblock ourselves by releasing our own temporary fork of ESLint to backport the fix so that we can unblock ourselves and our users until the v9 release. We'd use this to work on flat config on our end and once v9 is stable we could remove it. Do you see any other potential solutions? |
Please don't do that. As soon as you create a fork, then people will notice and start encouraging others to use it for the same reason. Then we have fragmentation. I'd say the best use of your time at this point would be to identify the commits that you'd like to see backported into v8.x and post them here. As I said, we're just not going to have the cycles to dig into this on our end until after v9 is released, so any help you're willing to give would be greatly appreciated. |
TSC Summary: We've made several bug fixes to flat config in the v9 branch that aren't in the v8 branch, which makes it difficult for plugins to support both v8 and v9 at the same time. This issue requests backporting those changes into v8 and then doing one last release in v8. At the moment, we don't have a way to release from any branch other than TSC Question: Do we want to backport flat config fixes into v8? If so, how can we go about this in the least disruptive way possible? |
The current main blocker for us so far is the commit for the issue mentioned in the OP - #17906 There may be others we find as we continue to iterate - but currently the lint setup in our repo hard crashes once converted to flat configs due to this issue - so it's hard to iterate further at this time.
I definitely agree - which is why we mention it as a temporary, last resort. Realistically we have a few options:
However (3) isn't an option. Given we power ~70% of ESLint users - there's an expectation that we support ESLint majors close to releases. Missing support means we hold back the ecosystem from progressing. For example right now we don't officially support flat configs and so a lot of people aren't even considering them - they'd rather wait for us to release our shareable flat configs. So the only options are either (1) or (2). |
Do what you need to do. I don't have anything additional to add to this topic at this time. |
Going through the flat config changes in the v9 releases. Here are the candidates for backporting:
There were some other changes, but they would be breaking, so I think these are the ones to consider. |
@nzakas, not sure why you referred me to here. My comment in #17820 was specifically targeted at @bradzacher for circumventing that issue in typescript-eslint. While it might alleviate the need for a backport of that specific fix, it has nothing to do with backporting in general. |
@woutermont sorry, you were commenting on a thread that led to this issue, so I invited you here to continue. If that's not the topic you care about, I'd suggest opening a different discussion so as not to confuse ongoing conversations. |
I've been digging into the hairy details of how a backport might work, and here's what I've found so far. All of this is assuming we have a
|
For 4 - npm will default to the You could explicitly tag the release as Eg like |
Perhaps an easier way: if we do a new release from a |
For the record, I am in favor of backporting, while recognizing the extra work needed by the team to pull it off. Beyond just these particular flat config bug fixes, I suspect there could occasionally be other bug fixes or even smaller features worth considering for backporting, to make multi-version compatibility easier for the ecosystem and perhaps occassionally to enable users stuck on old major versions to gain access to key features (like Node itself does). |
This issue is about backporting just these fixes, just this time. We aren't entertaining ongoing backports of bugs going forward. |
Per 2024-01-25 tsc-meeting, we've decided to:
|
Thoughts about backporting #17989 as well? |
I believe we can backport this too. |
#17989 changes |
Yes, in v8.x we would update |
Yes, I'll do it. |
In relation to backporting, the VS Code folks are saying that the current setup of VS Code plugin issue: microsoft/vscode-eslint#1644 |
In ESLint v8.57.0, as a side effect of backporting support for |
I believe that is ok, it should be returning true already if eslint.config.js is present. |
Agreed, that is okay and I think is the expected behavior. |
ESLint v8.57.0 has been released: |
All planned tasks (#17966 (comment)) have been completed, so closing. |
As requested by @fasttime - filing this as a new issue.
What did you expect to happen?
Flat Configs should not crash on v8 of ESLint
What actually happened?
Flat Configs can crash on v8.
Additional comments
There are some flat comfig issue like #17820 who have had their fixes merged after the v9 alpha release was prepared.
This unfortunately means that their fixes will not ship with v8 and instead will have to wait to ship with v9. This is a problem because in v9 flat configs are a breaking change, hard requirement.
Users that hit bugs with flat configs in v8 will be unable to migrate their config ahead of time and instead will be forced to try and manage the config upgrade as well as all of the other breaking changes that will be introduced in v9.
This is a problem because it greatly increases the workload to action the major bump. It also increases the risk involved in upgrading because there are more changes that have to be actioned. Together these can turn many users away from actioning a major upgrade - especially at a company where work needs to be scheduled or prioritised it can be really hard to get a big, risky piece of work on the roadmap when it has small returns (v9 likely won't add much immediate value for users as a lot of the changes will be internal).
In addition to the problem for users - there is also the same problem for ecosystem partners. For example the @typescript-eslint is currently hard-blocked by #17820 - it crashes our lint setup and is preventing us from upgrading ourselves. This is a major issue because if an ecosystem partner can't upgrade - they can't build support. And indeed not being able to upgrade our repo means we can't dogfood our flat config support - we can't reasonably ship something to users we haven't tested or that we know is known to be broken.
We'd love to ship support for flat configs now (typescript-eslint/typescript-eslint#7935) but without a fix we'll have to wait for v9 to ship support. This is especially scary for us because given our tight integration with ESLint we know there are going to be other breaking changes we need to handle. As a project we'll be looking to support v8 and v9 simultaneously - so we will have a lot of work to build and test for both versions at the same time. Anything we can do to reduce risk by shipping now would be a huge deal.
So after that wall of text.. What's the ask? We ask that you backport bug fixes to v8 to help people migrate ahead of the v9 release.
By ensuring flat configs in v8 are crash-free it enables users and ecosystem partners to upgrade ahead of v9, which is a big win for everyone.
The text was updated successfully, but these errors were encountered: