-
Notifications
You must be signed in to change notification settings - Fork 109
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
Release version with analyzer's Element2 APIs #743
Comments
Afaik we have been trying to avoid propagating the This is also what package:builds as a whole is (at least trying) to do. It is very messy though, internally we do actually have both APIs at once because we have no alternative, and the world is also simpler there so there isn't as much downside. cc @scheglov what is the status of the internal migration? |
Either way is fine by me. Consumers like drift_dev can bump to a new major version when it is released and use Element2 in all the existing APIs. |
Fwiw iirc package:builds has a branch which does use the new APIs (and this is what is in google3), and the plan was that any package that is merged internally would have a branch also that depends on that, which allows us to migrate the internal world prior to publishing the breaking change externally. |
Oh, and this package does in fact have a corresponding branch, https://github.com/dart-lang/source_gen/tree/analyzer-element2 |
I don't know exactly how many, if any, internal generators we still have to migrate. |
This would include drift_dev? |
What is the benefit of this? |
Internally we have a one version policy but we can't realistically migrate all internal code at once. This is why analyzer has no choice other than the *2, *3, etc APIs for migrations. So, we get an incremental internal migration because its a requirement, and externally we just rely on pub solves and don't double the API surface. |
I don't see what the internal migration has to do with the pub publish. If you publish source_gen 3.0 today, without doubling the surface area, only relying on Element2, and you keep pushing the analyzer_element2 branch internally, then you comply with one-version, and you continue to migrate incrementally internally. |
We are using the internal migration to validate the new APIs, and just generally don't want to publish externally while in this limbo state since we can't easily roll that back. |
Sounds good. |
Almost everything internal using source_gen has been migrated. There is one package that requires #738. In simolus3/drift#3492, @simolus3 was able to migrate almost everything in drift_dev. |
In order to migrate downstream packages like drift_dev, we need a release of source_gen that is compatible with Element2, like
spanForElement2
.The text was updated successfully, but these errors were encountered: