diff --git a/CMakeLists.txt b/CMakeLists.txt index dac7bdb..fd09b10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.01) +cmake_minimum_required(VERSION 3.10) project(libpolymake_julia) diff --git a/include/jlpolymake/jlpolymake.h b/include/jlpolymake/jlpolymake.h index f80e59a..e5ca0b4 100644 --- a/include/jlpolymake/jlpolymake.h +++ b/include/jlpolymake/jlpolymake.h @@ -45,7 +45,7 @@ #define JLPOLYMAKE_VERSION_MAJOR 0 #define JLPOLYMAKE_VERSION_MINOR 14 -#define JLPOLYMAKE_VERSION_PATCH 0 +#define JLPOLYMAKE_VERSION_PATCH 2 #define __JLPOLYMAKE_STR_HELPER(x) #x #define __JLPOLYMAKE_STR(x) __JLPOLYMAKE_STR_HELPER(x) diff --git a/src/polymake/generate_deps_tree.jl b/src/polymake/generate_deps_tree.jl index 9794d5a..5661a34 100644 --- a/src/polymake/generate_deps_tree.jl +++ b/src/polymake/generate_deps_tree.jl @@ -24,10 +24,18 @@ function full_artifact_dir(m::Module) end end -function force_symlink(source::AbstractString, target::AbstractString) - tmpfile = tempname(dirname(target); cleanup=false) - symlink(source, tmpfile) - Base.Filesystem.rename(tmpfile, target) +function force_symlink(target::AbstractString, link::AbstractString) + # the rename operation below should be atomic and make sure the link always points + # to a valid directory + # but macos disagrees and sometimes reading files below this path fails with `EINVAL` + # see also: http://www.weirdnet.nl/apple/rename.html + # (it seems to be fixed on hfs+ but not on apfs...) + # to reduce the frequency of this we only write the symlink if necessary + # (note this does not fully avoid the error) + islink(link) && readlink(link) == target && return + tmpfile = tempname(dirname(link); cleanup=false) + symlink(target, tmpfile) + Base.Filesystem.rename(tmpfile, link) end function prepare_deps_tree(targetdir::String) diff --git a/src/polymake/type_setup.pl b/src/polymake/type_setup.pl index b857f03..bf4a8c1 100644 --- a/src/polymake/type_setup.pl +++ b/src/polymake/type_setup.pl @@ -272,6 +272,7 @@ sub EdgeMap { Map(String,String), Map(String,Int), + Map(Int,String), Map(Int,Int), Map(Integer,Int), Map(Rational,Rational),