Skip to content
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

Skip delete for SDK summary and deps file #3573

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build_resolvers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.3.2

- Skip file delete for SDK summary and deps file. This will only impact behavior
for usage in `build_test` where there may be multiple resolvers used
concurrently.

## 2.3.1

- Fix a bug in the transitive digest builder, ensure we check if assets are
Expand Down
15 changes: 4 additions & 11 deletions build_resolvers/lib/src/sdk_summary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,12 @@ Future<String> defaultSdkSummaryGenerator() async {
package: await packagePath(package),
};

// Invalidate existing summary/version/analyzer files if present.
if (await depsFile.exists()) {
if (!await _checkDeps(depsFile, currentDeps)) {
await depsFile.delete();
if (await summaryFile.exists()) await summaryFile.delete();
}
} else if (await summaryFile.exists()) {
// Fallback for cases where we could not do a proper version check.
await summaryFile.delete();
}
final needsRebuild = !await summaryFile.exists() ||
!await depsFile.exists() ||
!await _checkDeps(depsFile, currentDeps);

// Generate the summary and version files if necessary.
if (!await summaryFile.exists()) {
if (needsRebuild) {
var watch = Stopwatch()..start();
_logger.info('Generating SDK summary...');
await summaryFile.create(recursive: true);
Expand Down
2 changes: 1 addition & 1 deletion build_resolvers/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build_resolvers
version: 2.3.1
version: 2.3.2
description: Resolve Dart code in a Builder
repository: https://github.com/dart-lang/build/tree/master/build_resolvers

Expand Down
Loading