Skip to content

Commit

Permalink
Require analyzer 3.4.1, prepare for future breaking changes. (#3269)
Browse files Browse the repository at this point in the history
* Update build_modules to analyzer 3.4.1, remove unnecessary null check.
  • Loading branch information
scheglov committed Mar 24, 2022
1 parent 09c1d25 commit e0bb137
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build_modules/lib/src/errors.dart
Expand Up @@ -104,7 +104,7 @@ Future<String?> _missingImportMessage(
return id == missingId;
});
if (import == null) return null;
var lineInfo = parsed.lineInfo!.getLocation(import.offset);
var lineInfo = parsed.lineInfo.getLocation(import.offset);
return '`$import` from $sourceId at $lineInfo';
}

Expand Down
2 changes: 1 addition & 1 deletion build_modules/pubspec.yaml
Expand Up @@ -7,7 +7,7 @@ environment:
sdk: ">=2.14.0 <3.0.0"

dependencies:
analyzer: ">=1.0.0 <4.0.0"
analyzer: ">=3.4.1 <4.0.0"
async: ^2.5.0
bazel_worker: ^1.0.0
build: ^2.0.0
Expand Down
1 change: 1 addition & 0 deletions build_resolvers/lib/src/build_asset_uri_resolver.dart
Expand Up @@ -80,6 +80,7 @@ class BuildAssetUriResolver extends UriResolver {
driver.changeFile(state.path);
}
}
await driver.applyPendingFileChanges();
}

/// Updates the internal state for [id], if it has changed.
Expand Down
7 changes: 5 additions & 2 deletions build_resolvers/lib/src/resolver.dart
Expand Up @@ -402,10 +402,13 @@ Future<String> _defaultSdkSummaryGenerator() async {
await summaryFile.create(recursive: true);
final embedderYamlPath =
isFlutter ? p.join(_dartUiPath, '_embedder.yaml') : null;
await summaryFile.writeAsBytes(buildSdkSummary(
await summaryFile.writeAsBytes(
await buildSdkSummary2(
sdkPath: _runningDartSdkPath,
resourceProvider: PhysicalResourceProvider.INSTANCE,
embedderYamlPath: embedderYamlPath));
embedderYamlPath: embedderYamlPath,
),
);

await _createDepsFile(depsFile, currentDeps);
watch.stop();
Expand Down
2 changes: 1 addition & 1 deletion build_resolvers/pubspec.yaml
Expand Up @@ -7,7 +7,7 @@ environment:
sdk: ">=2.14.0 <3.0.0"

dependencies:
analyzer: ">=2.8.0 <4.0.0"
analyzer: ">=3.4.1 <4.0.0"
async: ^2.5.0
build: ^2.0.0
crypto: ^3.0.0
Expand Down

0 comments on commit e0bb137

Please sign in to comment.