sdk
sdk copied to clipboard
Implement augmentations
This issue tracks the implementation of the augmentations feature.
@itsjustkevin, this implementation issue is needed because some work is ongoing in order to implement augmentations, and there's a need to have an issue number when approving tests that aren't yet working. Do you have a well-established way to generate all the subtasks?
Summary: This issue proposes adding a new feature called "augmentations" to the Dart language. The goal is to implement this feature and make it available to users.
Sorry @eernstg been a bit out of the loop. I previously used https://github.com/itsjustkevin/flutter_release_scripts/blob/main/languageFeatures.js which is now broken and needs to be rewritten as a Dart CLI as I have been adding more and more scripts.
Will manually add these features and update the script when I have some time.
Will the feature name be: Augment, Augmentations...?
Hi @itsjustkevin, thanks for looking into this!
The feature is currently covered by --enable-experiment=macros, but at least some members of tool teams want to split the experiment flags such that augmentations can be handled separately.
@johnniwinther, @srawlins, WDYT? Should we use --enable-experiment=augmentations for augmentations, and macros for macros? Presumably, the latter will imply the former.
It sounds like the scheduling is good because we can choose the experiment flag and the broken script issue in parallel, and then proceed when everybody is ready. ;-)
@sgrekhov, would this approach fit in with the management of experiment flags in co19 tests about augmentations?
Yes. I support the idea of having separate flags for the each feature. No problem for me to update the flags.
@eernstg with the response from @sgrekhov, have we decided to split out the experimental flags? Once this is confirmed, I will build the associated issue list.
I think everybody wants separate flags.
@johnniwinther, did you already create the augmentation related flag in some ongoing CL, or did I get that wrong?
I haven't created any flags. I'd also like for the "enhanced parts" to have its own flag FWIW.
And "enhanced parts" would be the name of the feature that generalizes part files to support imports? We could have this:
- 'macros' (already in use)
- 'augmentations' (plural, as is rather common for these flag names)
- 'enhanced-parts' (prior art: 'enhanced-enums')
The addition of the required information in $SDK/tools/experimental_features.yaml is done by a rather broad group of people, but it often seems to be a person who is doing some implementation in the area.
@johnniwinther, WDYT? I think we might as well just add them as soon as possible.
SGTM
https://dart-review.googlesource.com/c/sdk/+/374960
I can see that https://github.com/dart-lang/sdk/issues/56101 has been created to be the implementation issue for augmentations, so I'll close this issue.