From d6e585a5d63f91a6b51e461c908d62c8ead68eac Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Tue, 14 Nov 2023 15:20:23 +0100 Subject: [PATCH] use TimeZones fork again (#783) To address an issue with running the same ribasim binary simultaneously from different workers. ``` InitError(mod=:WindowsTimeZoneIDs, error=Base.IOError(msg="unlink("D:\\buildAgent\\work\\c463fd4bc9a9a18\\imod_collector_devel\\ribasim\\share\\julia\\scratchspaces\\f269a46b-ccf7-5d73-abea-4c690281aa53\\build\\local\\windowsZones.xml"): resource busy or locked (EBUSY)", code=-4082) ``` In making this PR I realized I forgot in #740 to actually run `strip_cldr`. --- Manifest.toml | 8 ++++--- build/create_binaries/src/create_binaries.jl | 1 - build/create_binaries/src/strip_cldr.jl | 25 -------------------- 3 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 build/create_binaries/src/strip_cldr.jl diff --git a/Manifest.toml b/Manifest.toml index 9b0e5d18a..054d6da8c 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.0-rc1" manifest_format = "2.0" -project_hash = "f38abc22b48e63729fc0df2250576035135df64d" +project_hash = "ebee755404797b896be47dd2693eb495c11ce0d0" [[deps.ADTypes]] git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" @@ -1506,8 +1506,10 @@ uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" version = "0.5.2" [[deps.TimeZones]] -deps = ["Artifacts", "Dates", "Downloads", "InlineStrings", "LazyArtifacts", "Mocking", "Printf", "Scratch", "TZJData", "Unicode", "p7zip_jll"] -git-tree-sha1 = "89e64d61ef3cd9e80f7fc12b7d13db2d75a23c03" +deps = ["Artifacts", "Dates", "Downloads", "InlineStrings", "Mocking", "Printf", "Scratch", "TZJData", "Unicode", "p7zip_jll"] +git-tree-sha1 = "6f2a9362603a79a916c54a10fc7c9a4ff2ca0848" +repo-rev = "cldr" +repo-url = "https://github.com/visr/TimeZones.jl" uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" version = "1.13.0" weakdeps = ["RecipesBase"] diff --git a/build/create_binaries/src/create_binaries.jl b/build/create_binaries/src/create_binaries.jl index dcd00dba1..24082d8ef 100644 --- a/build/create_binaries/src/create_binaries.jl +++ b/build/create_binaries/src/create_binaries.jl @@ -7,7 +7,6 @@ using LibGit2 export build_app, build_lib -include("strip_cldr.jl") include("add_metadata.jl") include("create_app.jl") include("create_lib.jl") diff --git a/build/create_binaries/src/strip_cldr.jl b/build/create_binaries/src/strip_cldr.jl deleted file mode 100644 index d63765403..000000000 --- a/build/create_binaries/src/strip_cldr.jl +++ /dev/null @@ -1,25 +0,0 @@ -""" -The cldr artifact has such long paths that it errors on Windows unless long paths are enabled. -Also the artifact has many files and is over 300 MB, while we only need a single small file. -This modifies the artifact to remove everything except the file we need. -Since the artifact is only used on Windows, only strip do it there. -This needs exactly TimeZones 1.13.0, which is fixed in the Project.toml. -https://github.com/JuliaTime/TimeZones.jl/issues/373 -""" -function strip_cldr() - if Sys.iswindows() - # Get the artifact directory and the file path we need to keep - hash = Base.SHA1("40b35727ea0aff9a9f28b7454004b68849caf67b") - @assert artifact_exists(hash) - artifact_dir = artifact_path(hash) - keep_file = - normpath(artifact_dir, "cldr-release-43-1/common/supplemental/windowsZones.xml") - @assert isfile(keep_file) - - # Read the file into memory, empty the artifact dir, and write the file back - keep_file_content = read(keep_file) - rm(artifact_dir; recursive = true) - mkpath(dirname(keep_file)) - write(keep_file, keep_file_content) - end -end