Skip to content

Commit

Permalink
fix windows failures (#2244)
Browse files Browse the repository at this point in the history
Fixes #2243 by not creating files that end in a `.`.

https://gist.github.com/jakemac53/845b60847dbda53f93aeed8056d5fbd2 illustrates what I think is the core of the issue. I would expect this to print false and also hit the catch block for every case. However, on 3.4.0, in the very first case the copy actually succeeds even though it claims the file doesn't exist. I filed dart-lang/sdk#55972 about this.
  • Loading branch information
jakemac53 authored Jun 10, 2024
1 parent 777631b commit 329c6df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkgs/test_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.6.5-wip

* Increase SDK constraint to ^3.4.0.
* Ensure we don't create files ending in a `.`, this breaks windows.

## 0.6.4

Expand Down
2 changes: 1 addition & 1 deletion pkgs/test_core/lib/src/runner/package_version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Future<String> get rootPackageLanguageVersionComment =>
final _rootPackageLanguageVersionComment = DetachingFuture(() async {
var packageConfig = await loadPackageConfigUri(await packageConfigUri);
var rootPackage = packageConfig.packageOf(Uri.file(p.absolute('foo.dart')));
if (rootPackage == null) return '';
if (rootPackage == null) return '// <unknown-language-version>';
return '// @dart=${rootPackage.languageVersion}';
}());

0 comments on commit 329c6df

Please sign in to comment.