From 0ff7678d59c6ab108a1e56a53f572155e98cc821 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Wed, 25 Oct 2023 10:19:12 +0200 Subject: [PATCH] use a TimeZones.jl fork for now Alternative to #687, which wasn't working well with PackageCompiler due to long paths still. This switches to a fork. A PR to merge this upstream has already been submitted: https://github.com/JuliaTime/TimeZones.jl/pull/450 Clearly this is temporary, but since we use Manifests this should work ok. --- build/create_binaries/Manifest.toml | 8 +++++--- build/create_binaries/Project.toml | 2 +- build/create_binaries/create_app.jl | 2 -- build/create_binaries/create_lib.jl | 2 -- build/create_binaries/strip_cldr.jl | 24 ------------------------ build/libribasim/Manifest.toml | 2 +- build/ribasim_cli/Manifest.toml | 2 +- core/Manifest.toml | 8 +++++--- core/Project.toml | 2 +- 9 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 build/create_binaries/strip_cldr.jl diff --git a/build/create_binaries/Manifest.toml b/build/create_binaries/Manifest.toml index 737ac860a..e98e5b7f9 100644 --- a/build/create_binaries/Manifest.toml +++ b/build/create_binaries/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.9.3" manifest_format = "2.0" -project_hash = "71b2262fd2a2bd6f9c0ade48d4062e051c3f39eb" +project_hash = "d99377ff8fe51b02cfd3a3aaf109a7ed1b45b3d2" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" @@ -191,8 +191,10 @@ uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" [[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" diff --git a/build/create_binaries/Project.toml b/build/create_binaries/Project.toml index 275616313..c3500a282 100644 --- a/build/create_binaries/Project.toml +++ b/build/create_binaries/Project.toml @@ -7,5 +7,5 @@ TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" [compat] PackageCompiler = "2" -TimeZones = "=1.13.0" +TimeZones = "1.13" julia = "1.9" diff --git a/build/create_binaries/create_app.jl b/build/create_binaries/create_app.jl index 72e6a7262..1e8f57450 100644 --- a/build/create_binaries/create_app.jl +++ b/build/create_binaries/create_app.jl @@ -2,8 +2,6 @@ using PackageCompiler using TOML using LibGit2 -include("strip_cldr.jl") - # change directory to this script's location cd(@__DIR__) diff --git a/build/create_binaries/create_lib.jl b/build/create_binaries/create_lib.jl index 0b8364099..54d05794e 100644 --- a/build/create_binaries/create_lib.jl +++ b/build/create_binaries/create_lib.jl @@ -2,8 +2,6 @@ using PackageCompiler using TOML using LibGit2 -include("strip_cldr.jl") - cd(@__DIR__) project_dir = "../libribasim" diff --git a/build/create_binaries/strip_cldr.jl b/build/create_binaries/strip_cldr.jl deleted file mode 100644 index fbded628c..000000000 --- a/build/create_binaries/strip_cldr.jl +++ /dev/null @@ -1,24 +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 - -using Artifacts - -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 diff --git a/build/libribasim/Manifest.toml b/build/libribasim/Manifest.toml index 5db3c6ffd..95db712d6 100644 --- a/build/libribasim/Manifest.toml +++ b/build/libribasim/Manifest.toml @@ -979,7 +979,7 @@ uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.0" [[deps.Ribasim]] -deps = ["Arrow", "BasicModelInterface", "CodecLz4", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "Dictionaries", "DiffEqCallbacks", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "Logging", "LoggingExtras", "OrdinaryDiffEq", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimerOutputs", "TranscodingStreams"] +deps = ["Arrow", "BasicModelInterface", "CodecLz4", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "Dictionaries", "DiffEqCallbacks", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "Logging", "LoggingExtras", "OrdinaryDiffEq", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimeZones", "TimerOutputs", "TranscodingStreams"] path = "../../core" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" version = "0.3.0" diff --git a/build/ribasim_cli/Manifest.toml b/build/ribasim_cli/Manifest.toml index 5885340d8..873b83b61 100644 --- a/build/ribasim_cli/Manifest.toml +++ b/build/ribasim_cli/Manifest.toml @@ -979,7 +979,7 @@ uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.0" [[deps.Ribasim]] -deps = ["Arrow", "BasicModelInterface", "CodecLz4", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "Dictionaries", "DiffEqCallbacks", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "Logging", "LoggingExtras", "OrdinaryDiffEq", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimerOutputs", "TranscodingStreams"] +deps = ["Arrow", "BasicModelInterface", "CodecLz4", "CodecZstd", "ComponentArrays", "Configurations", "DBInterface", "DataInterpolations", "DataStructures", "Dates", "Dictionaries", "DiffEqCallbacks", "FiniteDiff", "ForwardDiff", "Graphs", "HiGHS", "IterTools", "JuMP", "Legolas", "Logging", "LoggingExtras", "OrdinaryDiffEq", "PreallocationTools", "SQLite", "SciMLBase", "SparseArrays", "StructArrays", "Tables", "TerminalLoggers", "TimeZones", "TimerOutputs", "TranscodingStreams"] path = "../../core" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" version = "0.3.0" diff --git a/core/Manifest.toml b/core/Manifest.toml index 073418681..046b5db8c 100644 --- a/core/Manifest.toml +++ b/core/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.9.3" manifest_format = "2.0" -project_hash = "c63b237aec6a6bf6314284b2b07a94b93a9f0a36" +project_hash = "734d92f362e5faf41ff9058fcbfa26406306498c" [[deps.ADTypes]] git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" @@ -1257,8 +1257,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/core/Project.toml b/core/Project.toml index 62c01fb3b..532bd21a1 100644 --- a/core/Project.toml +++ b/core/Project.toml @@ -65,7 +65,7 @@ SciMLBase = "1.60, 2" StructArrays = "0.6.13" Tables = "1" TerminalLoggers = "0.1.7" -TimeZones = "=1.13.0" +TimeZones = "1.13" TimerOutputs = "0.5" TranscodingStreams = "0.9, 0.10" julia = "1.9"