-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[AssetMapper] fix tests on Windows #58152
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
xabbuh
commented
Sep 3, 2024
Q | A |
---|---|
Branch? | 7.2 |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Issues | |
License | MIT |
There is a temp file created that also needs to be removable when cleaning up in the |
Thank you @xabbuh this test really broke my mind (#58141 (review)) I'm not sure exacty "when" this temp file is created... my guts say there is something wrong with the /.! format that mess with the Finder list of files, and we end up trying to remove a directory before its content, but until now my guts have been wrong on this so ... 😅 Notes i made trying to debug this:
So the exception is thrown during the test teardown (RemotePackageStorageTest.php) symfony/src/Symfony/Component/AssetMapper/Tests/ImportMap/RemotePackageStorageTest.php Lines 33 to 36 in cc11de0
This method calls the Filesystem remove() method (with a directory path)
The remove then call the doRemove with the directory and recursive "false" And after some iterations of symfony/src/Symfony/Component/Filesystem/Filesystem.php Lines 184 to 185 in cc11de0
We arrive at the final exception symfony/src/Symfony/Component/Filesystem/Filesystem.php Lines 196 to 198 in cc11de0
So if you have any way to know precisely when it is created i'd be very interested to know |
I just had another look and found the root issue to be located in the Filesystem component. In the |
…dows (xabbuh) This PR was merged into the 5.4 branch. Discussion ---------- [Filesystem] make sure temp files can be cleaned up on Windows | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT based on the findings while debugging the AppVeyor failures that we worked around in #58152 Commits ------- a832b67 make sure temp files can be cleaned up on Windows
so we can revert this now: #58302 |
This PR was merged into the 7.2 branch. Discussion ---------- [Filesystem] revert test changes | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT we can revert #58152 now that the underlying bug was fixed with #58185 Commits ------- 5ea44be revert test changes
…apper` command (smnandre) This PR was squashed before being merged into the 7.2 branch. Discussion ---------- [AssetMapper] Search & filter assets in `debug:asset-mapper` command | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | Fix #... | License | MIT * Add `name` optional argument to filter paths & assets * Add `--ext` option to filter assets by extension (e.g "css") * Add `--vendor` option to only show assets from vendor packages (and `--no-vendor` to hide them) * Update command help Update: ~~* skip flappy test using chmod on Windows~~ (done by `@xabbuh` in #58152) Commits ------- 8806e24 [AssetMapper] Search & filter assets in `debug:asset-mapper` command