-
Notifications
You must be signed in to change notification settings - Fork 127
Enable language version 3.10 and format dot shorthands. #1745
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
Conversation
This is using a workaround for dart-lang/sdk#60840. That issue is fixed and a new version of analyzer is published, but unfortunately there is no corresponding version of test that works with it so I can't upgrade yet. The workaround is pretty harmless, so I'm fine with it. (The formatter uses similar logic to handle commas which also aren't represented in the AST nodes.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be fine to use a dependency override to get a working pub solve before a new test
is published - it's very likely compatible code and needs only a pubspec change.
The only change in this version is allowing 3.9 as a supported language version. This was rolled into the SDK a couple of weeks ago, but not published. I figure I should publish this before rolling the supported version again to 3.10 just in case any external needs 3.9 support. I'll land this before landing #1745.
The only change in this version is allowing 3.9 as a supported language version. This was rolled into the SDK a couple of weeks ago, but not published. I figure I should publish this before rolling the supported version again to 3.10 just in case any external needs 3.9 support. I'll land this before landing #1745.
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
I just tried that and it looks like there are a decent number of changes I'll have to make to get things working with 8.0.0, so I'll probably land the workaround for now and then update to 8.0.0 when the new test version is out. |
Actually, it turns out the changes were trivial so I'll sit on this PR until the new test version is out and then upload a commit that bumps to 8.0.0. |
OK, I updated to the latest analyzer and removed the workarounds now that the AST has everything I need. PTAL, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Bob!
This is using a workaround for dart-lang/sdk#60840. That issue is fixed and a new version of analyzer is published, but unfortunately there is no corresponding version of test that works with it so I can't upgrade yet.
The workaround is pretty harmless, so I'm fine with it. (The formatter uses similar logic to handle commas which also aren't represented in the AST nodes.)
I pulled the tests here by looking at the language tests for the feature (which are excellent and comprehensive) so I think I covered everything. I verified that the formatter can format everything in the SDK language tests (at least everything that can be parsed because there are error tests in there). Let me know if you see any corners of the syntax I missed. (I didn't realize that you could use
const
until I read the tests.)Fix #1686.