-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Make Assets more robust across platforms #14246
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
Conversation
|
This change appears to have made We claim here and here that one can run ../../bin/cache/dart-sdk/bin/pub run testHowever, the non-hermetic file manipulation introduced by this change seems to require the use of the |
|
@mravn-google that's probably a side-effect of changing the tests to operate on the real file system. That change was necessary to make sure that the logic works on all platforms (especially Windows). Previously, the logic was only tested with posix-like paths and had many flaws on Windows. Work-around: let's document that you need to specify The real fix is: https://github.com/google/file.dart/issues/68. |
|
FYI, google/file.dart#68 was fixed yesterday, so we should be able now to make these tests run using |
|
As of #16442, the new |
Previously, the AssetBundle would use URIs and file paths interchangeable. This works on POSIX platforms because they are essentially the same there. However, on Windows they are not: A URI uses a
/as path separator while a file path (on Windows) uses a\. As a result, assets could sometimes not be located on Windows.This patch ensures that the platform-independent URIs are used everywhere to resolve this problem. It also removes the MemoryFileSystem from all asset-related tests, which has been hiding this problem (MemoreyFileSystem emulates POSIX and therefore hides problems specific to Windows file paths).
Fixes #14220.