-
Notifications
You must be signed in to change notification settings - Fork 58
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
Allow analyzer 1.0 #736
Merged
Merged
Allow analyzer 1.0 #736
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0dc0683
Allow analyzer 1.0
robbecker-wf 2283fd1
more ranges widened
robbecker-wf 11809d2
use git refs
robbecker-wf 7be8925
remove git overrides now that pkgs are published
robbecker-wf 65939e4
use a range for analyzer, widen plugin deps
robbecker-wf ed98e76
restore plugin pubspec changes
robbecker-wf 45612aa
restore analyzer 1.0 since build 2.0 is required
robbecker-wf 49df880
Merge remote-tracking branch 'origin/master' into analyzer1
robrbecker da645a2
Revert "restore analyzer 1.0 since build 2.0 is required"
greglittlefield-wf 28b05c4
Lower lower bound of analyzer as much as possible
greglittlefield-wf da63635
Add CI validation for each supported analyzer version
greglittlefield-wf ea26aa9
Support build 1.x and 2.x at the same time
greglittlefield-wf 54169b2
Fix syntax, disable fail-fast
greglittlefield-wf 1f865aa
Add Dart setup to matrix
greglittlefield-wf fff6dfe
Remove ^0.42.0 from matrix
greglittlefield-wf 0e3d011
Revert analyzer_plugin pubspec.yaml changes, for now
greglittlefield-wf 320d7fa
Update tool/validate_analyzer_version.sh
robbecker-wf 4cdd736
Move script into separate CI steps for improved readability
greglittlefield-wf f582396
Raise built_redux upper bound
greglittlefield-wf 6509584
Output the updated version constraint in CI
greglittlefield-wf 7c7dead
Add arguments to parameters made required in built_redux 8.0.0
greglittlefield-wf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
test/over_react/component_declaration/redux_component_test/test_reducer.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import 'dart:io'; | ||
|
||
final analyzerConstraintPattern = | ||
RegExp(r'^( +analyzer:\s*).+', multiLine: true); | ||
|
||
void main(List<String> args) { | ||
if (args.length != 1) { | ||
throw ArgumentError( | ||
'Expected a single arg for the new analyzer constraint. Args: $args'); | ||
} | ||
final newAnalyzerConstraint = args.single; | ||
|
||
final pubspec = File('pubspec.yaml'); | ||
final pubspecContents = pubspec.readAsStringSync(); | ||
|
||
final matches = analyzerConstraintPattern.allMatches(pubspecContents); | ||
if (matches.length != 1) { | ||
throw Exception( | ||
'Expected 1 analyzer dependency match in ${pubspec.path}, but found ${matches.length}.'); | ||
} | ||
|
||
pubspec.writeAsStringSync(pubspecContents.replaceFirstMapped( | ||
analyzerConstraintPattern, | ||
(match) => '${match.group(1)}$newAnalyzerConstraint')); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Fail this script if any command fails | ||
set -e | ||
# Print commands as they run | ||
greglittlefield-wf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set -x | ||
|
||
analyzer_constraint="$1" | ||
|
||
echo "Validating analyzer version constraint: $analyzer_constraint" | ||
|
||
# sed -i is not portable, so we write to a separate file: https://unix.stackexchange.com/a/92907 | ||
dart tool/set_analyzer_constraint.dart "$analyzer_constraint" | ||
|
||
pub get | ||
robbecker-wf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
dart analyze . | ||
|
||
# Verify the over_react builder runs without errors, since the builder itself isn't fully covered by tests. | ||
dart run build_runner build --build-filter='**.dart' --delete-conflicting-outputs | ||
|
||
dart run test -p vm -- test/vm_tests/builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
built_redux < 8.0.0
does not allow analyzer 1.0. Should this be expanded?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.
Based on this CI run it seems like it does:
Though, I'm not opposed to raising the bound on built_redux so this package isn't a bottleneck. Let me take a look
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.
yeah we've backpatched built_redux v7 to allow analyzer v1