sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Implement augmentations

Open eernstg opened this issue 1 year ago • 2 comments
trafficstars

This issue tracks the implementation of the augmentations feature.

eernstg avatar Jun 28 '24 08:06 eernstg

@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?

eernstg avatar Jun 28 '24 08:06 eernstg

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.

dart-github-bot avatar Jun 28 '24 08:06 dart-github-bot

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...?

itsjustkevin avatar Jul 01 '24 14:07 itsjustkevin

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?

eernstg avatar Jul 01 '24 14:07 eernstg

Yes. I support the idea of having separate flags for the each feature. No problem for me to update the flags.

sgrekhov avatar Jul 01 '24 15:07 sgrekhov

@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.

itsjustkevin avatar Jul 02 '24 20:07 itsjustkevin

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?

eernstg avatar Jul 05 '24 10:07 eernstg

I haven't created any flags. I'd also like for the "enhanced parts" to have its own flag FWIW.

johnniwinther avatar Jul 08 '24 03:07 johnniwinther

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.

eernstg avatar Jul 08 '24 07:07 eernstg

SGTM

johnniwinther avatar Jul 08 '24 09:07 johnniwinther

https://dart-review.googlesource.com/c/sdk/+/374960

eernstg avatar Jul 09 '24 09:07 eernstg

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.

eernstg avatar Jul 09 '24 09:07 eernstg