File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,18 @@ function full_artifact_dir(m::Module)
2424 end
2525end
2626
27- function force_symlink(source:: AbstractString , target:: AbstractString )
28- tmpfile = tempname(dirname(target); cleanup= false )
29- symlink(source, tmpfile)
30- Base. Filesystem. rename(tmpfile, target)
27+ function force_symlink(target:: AbstractString , link:: AbstractString )
28+ # the rename operation below should be atomic and make sure the link always points
29+ # to a valid directory
30+ # but macos disagrees and sometimes reading files below this path fails with `EINVAL`
31+ # see also: http://www.weirdnet.nl/apple/rename.html
32+ # (it seems to be fixed on hfs+ but not on apfs...)
33+ # to reduce the frequency of this we only write the symlink if necessary
34+ # (note this does not fully avoid the error)
35+ islink(link) && readlink(link) == target && return
36+ tmpfile = tempname(dirname(link); cleanup= false )
37+ symlink(target, tmpfile)
38+ Base. Filesystem. rename(tmpfile, link)
3139end
3240
3341function prepare_deps_tree(targetdir:: String )
Original file line number Diff line number Diff line change @@ -272,6 +272,7 @@ sub EdgeMap {
272272
273273 Map(String,String),
274274 Map(String,Int),
275+ Map(Int,String),
275276 Map(Int,Int),
276277 Map(Integer,Int),
277278 Map(Rational,Rational),
You can’t perform that action at this time.
0 commit comments