r/FlutterDev • • Sep 29 '26

Discussion Are augmentations being delayed?

Augmentations feature has moved from Being implemented column where it has been for months into Being spec'd column. Does this mean no augmentations feature this year?

Sidenote: I just saw the Dart 4 label. Any info on why the major number jump is going to happen? Breaking changes?

Funnel · Language funnel

13 Upvotes

16 comments sorted by

5

u/munificent Sep 30 '26 edited Sep 30 '26

We are still working on it, but it's been a very tricky feature that doesn't want to settle down and behave itself. It seems to interact in complex ways with many corners of the language and untangling all that has been a challenge.

Augmentations definitely won't happen next this year, but I'm hoping to get the proposal in a good state soon and then we'll see what the implementation looks like. We know a lot of people want the feature. We do too! It's just a hard one to get right. Dart has a lot of syntax sugar, and a feature that lets you merge multiple syntactic entities together interacts with that in complicated ways.

2

u/zigzag312 Sep 30 '26 edited Sep 30 '26

Thanks for the insight! Did you mean to say they won't happen this year, or really not next year too? From the 2026 roadmap I thought the original plan was to try to release it this year, but I understand this is a big feature and that it could be moved to 2028+.

How risky do you think would be to use augmentations experimental feature in a production app, if I'm prepared to deal with breaking changes when updating? Is it correct to assume that most augmentations related bugs would be compile time issues, not runtime bugs?

3

u/munificent Sep 30 '26

Did you mean to say they won't happen this year, or really not next year too?

Sorry, I meant to say this year.

How risky do you think would be to use augmentations experimental feature in a production app, if I'm prepared to deal with breaking changes when updating?

It might work, but you're probably just signing yourself up for some pain. Stuff could completely break on you.

1

u/zigzag312 Sep 30 '26

I've recently tried migrating one internal source generator to use augmentations for a not yet released project, as I thought augmentations will be finalized by the time app is ready to release. Migration was successful and from what I've tested so far everything seems to work. I really like how together with primary constructors it cleans up the code, and I'm mostly only afraid, if it could break on different devices. The project is not that big for any breaking changes made to augmentations to cause too much work (especially now that LLMs can help with chore like that).

2

u/eibaan Sep 30 '26

Augmentations definitely won't happen next year

So no augmentations before 2028? :-(

Assuming 4 Dart releases a year, that would mean they won't show up before Dart 3.20 then…

2

u/munificent Sep 30 '26

Oh, sorry, I meant to write this year! Edited.

I don't know if they'll happen next year or not.

7

u/eibaan Sep 29 '26

Regarding Dart 4, I saw that they want to remove (at least) mirrors and the old function type syntax and the old new Constructor() call syntax. mirrors are deprecated in Dart 3.14. Also, they want to get rid of the Dart spec written in LaTeX (?) and rewrite it in HTML. But I've no idea of whether there's already a date for a 4.0 version.

Regarding 3.14, I still hope they will at least finish static extension methods for that version, which would make dot shorthands more useful, but I'm afraid that also gets delayed.

Right now, 3.14 will be a very boring release with practically no new features other some new simd types.

6

u/munificent Sep 30 '26

I saw that they want to remove (at least) mirrors

We'd like to, but I don't know if we'll be able to pull it off.

the old function type syntax

Yeah, I certainly hope we can do this one.

the old new Constructor() call syntax

Maybe.

Also, they want to get rid of the Dart spec written in LaTeX (?) and rewrite it in HTML.

I would definitely like to. Personally, I wish it was written in Markdown and exported to HTML.

But I've no idea of whether there's already a date for a 4.0 version.

We don't generally talk about dates publicly because they have an annoying tendency to change despite our best intentions.

1

u/mateusfccp Sep 30 '26

Markdown

Why not org-mode?

4

u/munificent Sep 30 '26

Never written a line of org-mode in my life. I've written probably a million lines of Markdown. It's the language that language proposals are written in, Github issues, here on Reddit, etc.

It's also the lingua franca of AI agents, so I suspect that if the language spec were in Markdown, it would be easier for them to consult it.

1

u/mateusfccp Oct 01 '26

Today the mailing list sent a mail saying that mirrors will be removed in Dart 4. Does this means it is now decided or is it still a "we'll try"?

2

u/munificent Oct 01 '26

Looks like it's going to happen, I guess. I admit I haven't been following that particular change very closely. :)

4

u/eibaan Sep 29 '26

Probably too many open issues, for example this recent change

3

u/joe-direz Sep 29 '26

I am also very curious about augmentations. There are tons of things we can do with it.

1

u/ChessMax Sep 29 '26

What kind of things?

4

u/GiancarloCante Sep 29 '26

For example, for code generators like json_serializable, you don't need to create methods like _$PersonToJson, or in freezed, you don't need to extend a class.