Skip to content

Breaking changes in dart 2.19 #50953

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

Closed
bsutton opened this issue Jan 8, 2023 · 6 comments
Closed

Breaking changes in dart 2.19 #50953

bsutton opened this issue Jan 8, 2023 · 6 comments
Labels
type-question A question about expected behavior or functionality

Comments

@bsutton
Copy link

bsutton commented Jan 8, 2023

This might be a bit late to the party, but I"m concerned about a number of breaking changes in dart 2.19

File.create
CastError
path change from pub.dartlang.org to pub.dev

When I first became aware of the above changes (well the last one I only encountered today) I didn't realise the impact nor how close to a 3.0 release we are.

I primarily build CLI apps (and maintain the DCli package). I've now encountered problems (in the wild) with the above changes breaking apps.
I do wonder, given how close we are to a 3.x release, whether these breaking changes should have been left to the 3.x release.

I've largely worked around the issues but worry it might have an extensive impact on the other CLI apps published via pub.dev.

@mraleph
Copy link
Member

mraleph commented Jan 9, 2023

I think there is no way we can unroll any of these changes. The release process for 2.19 and corresponding Flutter release is basically almost done.

File.create change is in 2.19 since August and had been propagated into Flutter's beta. Removing it now would require breaking change again. It's a non-starter.

CastError

I am not sure about CastError removal. This is supposed to be 3.0 specific change and should not be 2.19 AFAIK. Can you clarify?

path change from pub.dartlang.org to pub.dev

Can you clarify what this refers to? I would assume that the hostname pub talks too is an implementation detail. Similarly anything in .pub_cache is an implementation detail. So if pub changes pub.dartlang.org to pub.dev somewhere it is not a breaking change per se.

/cc @mit-mit

@mraleph mraleph added the type-question A question about expected behavior or functionality label Jan 9, 2023
@lrhn
Copy link
Member

lrhn commented Jan 9, 2023

CastError was changed a little in 2.19. Changelog says:

The deprecation is not breaking, and the type change shouldn't be, so I'd also like to know what problems it has caused, in case it's something we can reasonably fix instead of waiting for 3.0 where CastError is removed.

If code depends on a CastError or TypeError being thrown, they still will. If code depends on a CastError or TypeError not being thrown where the other one is, it might become confused, but we do not consider it a breaking change to change the behavior of code which throw an error.

(We still have a problem with the text message of cast errors, but that's cosmetic.)

@mit-mit
Copy link
Member

mit-mit commented Jan 9, 2023

I've now encountered problems (in the wild) with the above changes breaking apps.

More concrete details about these would be appreciated.

@mraleph mraleph added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Jan 10, 2023
@mit-mit
Copy link
Member

mit-mit commented Jan 13, 2023

@bsutton can you please respond with further information? If not, we'll have to close this issue as not actionable...

@bsutton
Copy link
Author

bsutton commented Jan 14, 2023 via email

@github-actions github-actions bot removed the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Jan 14, 2023
@lrhn
Copy link
Member

lrhn commented Jan 14, 2023

Thanks. 😄
The CastError removal will probably be disruptive when 3.0 lands, but probably also not the biggest change.

@lrhn lrhn closed this as completed Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-question A question about expected behavior or functionality
Projects
None yet
Development

No branches or pull requests

4 participants