Skip to content

Conversation

@bicycle1885
Copy link
Member

This fixes #25971.

@test filemode(sourcefile) == filemode(cachefile)
finally
rm(load_path, recursive=true)
rm(load_cache_path, recursive=true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though CI is passing, should the updates to LOAD_PATH and DEPOT_PATH be reversed again?

Suggested change
rm(load_cache_path, recursive=true)
rm(load_cache_path, recursive=true)
filter!(s -> s != load_path, LOAD_PATH)
filter!(s -> s != load_cache_path, DEPOT_PATH)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should suggest using popfirst!(LOAD_PATH) instead.

Copy link
Contributor

@jonas-schulze jonas-schulze Jan 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've thought about that, too, but using filter! would seems to be more robust in case of a failure in between or even before the pushfirst!s, or should the tests be run concurrently some time in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way is to copy before running the code and then copy! it back when done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed those paths as @jonas-schulze suggested. Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, mktempdir now automatically deletes the folder when the process exits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a best practice to delete when done using.

@KristofferC KristofferC merged commit 5075472 into JuliaLang:master Feb 3, 2020
@bicycle1885 bicycle1885 deleted the cachemode branch February 3, 2020 14:32
KristofferC pushed a commit that referenced this pull request Feb 5, 2020
* make package cache interit permission from source

* remove temporary directries

(cherry picked from commit 5075472)
@KristofferC KristofferC mentioned this pull request Feb 5, 2020
26 tasks
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
* make package cache interit permission from source

* remove temporary directries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permission of precompiled files

4 participants