-
Notifications
You must be signed in to change notification settings - Fork 48
feat!: allow analyzer 7.0.0 and update dart_style to ^3.0.0 #970
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
base: main
Are you sure you want to change the base?
Conversation
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR).
API leaks
|
Package | Leaked API symbols |
---|---|
intl_translation | Message MainMessage |
This check can be disabled by tagging the PR with skip-leaking-check
.
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files |
---|
no missing headers |
All source files should start with a license header.
Had to also update That should also fix this failing check |
@@ -2,7 +2,7 @@ | |||
// This is a library that provides messages for a fr_xyz123 locale. All the | |||
// messages from the main program should be duplicated here with the same | |||
// function name. | |||
|
|||
// @dart=2.12 |
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.
Are these necessary?
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.
I'm unsure about all the implications of removing this.
From the dart_style changelog I understand that this will override the language version that the DartFormatter
would use. Meaning it will always format based on Dart 2.12, instead of the users' language version.
They are added via this file that I didn't touch.
I used the regenerate.sh
scripts here and here to apply the updated formatting.
One of the workflows fail:
It seems I don't know what the replacement for that is and currently don't have the capacity to dive into this deeper. Would you be okay with me adding an ignore and TODO comment, so this can be addressed once the analyzer dependency constraints are updated to a version where this is fully removed? |
I looked up who would do such a stupid thing as deprecating without giving an alternative - it was me! 😆 I do think that replacing it would be the safer choice, this library is brittle enough as is... Maybe something along the lines of what I did in that PR could also be done here?
Let me check. |
Something like the last commit in this maybe? #972 |
_ => null, | ||
}; | ||
|
||
Iterable<String>? _checkChildren<T>(Iterable<StringLiteral> strings) { |
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.
@mosuem do we need the generic T
here? I don't see it used anywhere.
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.
No, that's a refactoring leftover I believe
Thank you for the code suggestion and the timely reviews! I cherry-picked the commit into this PR. All tests are passing locally. Hopefully the pipeline does, too 🤞 |
@mosuem there is another I naiively tried to replace it with Could you give some guidance how to replace it there? :) |
I added a fix - probably some tests would be nice to have though. |
@mosuem thanks for supporting with the fix 👍 I let AI create some test cases. They make sense to me. Would be great if you could check if they are actually useful and if we should drop or add some cases. |
Allows analyzer version ^7.0.0 and update dart_style to ^3.0.0.
The update of
dart_style
to^3.0.0
is a breaking change.Related issue: #950
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.