From 97b667e32422690eaf30a1ffe0bec4d90ca07824 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Fri, 5 Dec 2025 14:02:34 +0100 Subject: [PATCH 1/7] Use Julia 1.12, Pkg workspaces and JuliaC sans trimming, take 2 Trying https://github.com/Deltares/Ribasim/pull/2629 again now that we are some patch releases further along. --- .vscode/settings.json | 2 +- Manifest.toml | 117 ++++++++++++------ Project.toml | 12 +- build/README.md | 13 +- build/build.jl | 65 ++++++---- build/cli/src/main.rs | 5 - {core/src => build}/libribasim.jl | 6 +- build/precompile.jl | 16 --- core/Project.toml | 33 +---- core/src/Ribasim.jl | 3 - core/test/Project.toml | 52 ++++++++ core/test/libribasim_test.jl | 6 +- pixi.toml | 8 +- python/ribasim_api/ribasim_api/ribasim_api.py | 9 -- python/ribasim_api/tests/conftest.py | 13 -- utils/unset-ssl-cert.bat | 6 - 16 files changed, 196 insertions(+), 170 deletions(-) rename {core/src => build}/libribasim.jl (98%) delete mode 100644 build/precompile.jl create mode 100644 core/test/Project.toml delete mode 100644 utils/unset-ssl-cert.bat diff --git a/.vscode/settings.json b/.vscode/settings.json index 7b830dd04..165b66253 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,7 +63,7 @@ "Ribasim" ], "files.insertFinalNewline": true, - "julia.executablePath": "julia +1.11.7", + "julia.executablePath": "julia +1.12.3", "julia.additionalArgs": [ "--check-bounds=yes" ], diff --git a/Manifest.toml b/Manifest.toml index 22773bbf1..6108649d2 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.7" +julia_version = "1.12.3" manifest_format = "2.0" -project_hash = "7cacbcf19f33a4bec42693e39c8b3959d3263201" +project_hash = "3098a4aeca387ef5ccc3c6f4042667b1fe46a752" [[deps.ADTypes]] git-tree-sha1 = "8b2b045b22740e4be20654175cc38291d48539db" @@ -356,7 +356,7 @@ version = "0.1.1" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.1.1+0" +version = "1.3.0+1" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" @@ -626,7 +626,7 @@ version = "0.9.5" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" +version = "1.7.0" [[deps.Dualization]] deps = ["LinearAlgebra", "MathOptInterface"] @@ -1100,12 +1100,25 @@ version = "1.29.3" [deps.JuMP.weakdeps] DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" +[[deps.JuliaC]] +deps = ["LazyArtifacts", "Libdl", "Mmap", "ObjectFile", "PackageCompiler", "Patchelf_jll", "Pkg", "RelocatableFolders", "StructIO"] +git-tree-sha1 = "bd15b445e836f5bb4f4640746cb698fab191ab1d" +repo-rev = "default_cpu_target" +repo-url = "https://github.com/visr/JuliaC.jl" +uuid = "acedd4c2-ced6-4a15-accc-2607eb759ba2" +version = "0.2.3" + [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] git-tree-sha1 = "80580012d4ed5a3e8b18c7cd86cebe4b816d17a6" uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" version = "0.10.9" +[[deps.JuliaSyntaxHighlighting]] +deps = ["StyledStrings"] +uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" +version = "1.12.0" + [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] git-tree-sha1 = "09895a8e17b0aa97df8964ed13c94d1b6d9de666" @@ -1214,24 +1227,24 @@ uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" version = "0.6.4" [[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.6.0+0" +version = "8.15.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" version = "1.11.0" [[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" +version = "1.9.0+0" [[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +deps = ["Artifacts", "Libdl", "OpenSSL_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.11.3+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -1281,9 +1294,9 @@ version = "0.2.3" [[deps.LineSearch]] deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] -git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" +git-tree-sha1 = "83047a5d6a285c9acf1484ab47158ff42235a9a6" uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" -version = "0.1.4" +version = "0.1.5" [deps.LineSearch.extensions] LineSearchLineSearchesExt = "LineSearches" @@ -1294,7 +1307,7 @@ version = "0.1.4" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" +version = "1.12.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"] @@ -1430,7 +1443,7 @@ uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" version = "0.1.8" [[deps.Markdown]] -deps = ["Base64"] +deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" version = "1.11.0" @@ -1479,9 +1492,10 @@ uuid = "739be429-bea8-5141-9913-cc70e7f3736d" version = "1.1.9" [[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "ff69a2b1330bcb730b9ac1ab7dd680176f5896b8" uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.6+0" +version = "2.28.1010+0" [[deps.Measures]] git-tree-sha1 = "b513cedd20d9c914783d8ad83d08120702bf2c77" @@ -1530,7 +1544,7 @@ version = "0.3.7" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.12.12" +version = "2025.5.20" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1569,13 +1583,13 @@ version = "401.900.300+0" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" +version = "1.3.0" [[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "1d091cfece012662b06d25c792b3a43a0804c47b" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "ReTestItems", "Reexport", "SciMLBase", "SciMLLogging", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "a29cf26cd3314f0be0bc04d42c6d0170dfa65d68" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "4.12.0" +version = "4.13.0" [deps.NonlinearSolve.extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -1662,6 +1676,12 @@ weakdeps = ["ForwardDiff"] [deps.NonlinearSolveSpectralMethods.extensions] NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" +[[deps.ObjectFile]] +deps = ["Reexport", "StructIO"] +git-tree-sha1 = "22faba70c22d2f03e60fbc61da99c4ebfc3eb9ba" +uuid = "d8793406-e978-5875-9003-1fc021f44a92" +version = "0.5.0" + [[deps.OffsetArrays]] git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" @@ -1686,12 +1706,12 @@ version = "0.3.29+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" +version = "0.3.29+0" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.5+0" +version = "0.8.7+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] @@ -1706,8 +1726,7 @@ uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" version = "1.6.1" [[deps.OpenSSL_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f19301ae653233bc88b1810ae908194f07f8db9d" +deps = ["Artifacts", "Libdl"] uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" version = "3.5.4+0" @@ -1797,7 +1816,7 @@ version = "1.1.3" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+1" +version = "10.44.0+1" [[deps.PackageCompiler]] deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] @@ -1819,6 +1838,12 @@ git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.3" +[[deps.Patchelf_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "ad1cab3e8273c912f722f40779e20f3e29d58f1f" +uuid = "f2cf89d6-2bfd-5c44-bd2c-068eea195c0c" +version = "0.18.0+0" + [[deps.Pidfile]] deps = ["FileWatching", "Test"] git-tree-sha1 = "2d8aaf8ee10df53d0dfb9b8ee44ae7c04ced2b03" @@ -1834,7 +1859,7 @@ version = "0.44.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.11.0" +version = "1.12.1" weakdeps = ["REPL"] [deps.Pkg.extensions] @@ -1914,9 +1939,9 @@ version = "0.4.34" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.1" +version = "1.3.3" [[deps.Preferences]] deps = ["TOML"] @@ -1936,6 +1961,7 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" version = "1.11.0" [[deps.Profile]] +deps = ["StyledStrings"] uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" version = "1.11.0" @@ -1989,7 +2015,7 @@ uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" version = "6.8.2+2" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" version = "1.11.0" @@ -1998,6 +2024,12 @@ deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" version = "1.11.0" +[[deps.ReTestItems]] +deps = ["Dates", "Logging", "Pkg", "Serialization", "Sockets", "Test", "TestEnv"] +git-tree-sha1 = "dbf07c2981b44bd4c5cbb6180819f7a3a43ff1d2" +uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" +version = "1.35.0" + [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -2169,9 +2201,9 @@ version = "0.1.12" [[deps.SciMLLogging]] deps = ["Logging", "LoggingExtras", "Preferences"] -git-tree-sha1 = "39b1b0a70b5625f6d2fb7d4bb6d53b8875350964" +git-tree-sha1 = "7eebb9985e35b123e12025a3a2ad020cd6059f71" uuid = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" -version = "1.7.1" +version = "1.8.0" [[deps.SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] @@ -2274,7 +2306,7 @@ version = "1.2.2" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" +version = "1.12.0" [[deps.SparseConnectivityTracer]] deps = ["ADTypes", "DocStringExtensions", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"] @@ -2424,6 +2456,11 @@ version = "0.7.2" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +[[deps.StructIO]] +git-tree-sha1 = "c581be48ae1cbf83e899b14c07a807e1787512cc" +uuid = "53d494c1-5632-5724-8f4c-31dff12d585f" +version = "0.3.1" + [[deps.StructTypes]] deps = ["Dates", "UUIDs"] git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" @@ -2437,7 +2474,7 @@ version = "1.11.0" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" +version = "7.8.3+2" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] @@ -2762,7 +2799,7 @@ version = "1.6.0+0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.3.1+2" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -2803,7 +2840,7 @@ version = "0.17.4+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.11.0+0" +version = "5.15.0+0" [[deps.libdecor_jll]] deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] @@ -2868,7 +2905,7 @@ version = "1.1.7+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.59.0+0" +version = "1.64.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] @@ -2877,9 +2914,9 @@ uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" version = "2022.0.0+1" [[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.7.0+0" [[deps.pixi_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] diff --git a/Project.toml b/Project.toml index c82d8a57b..d6b72663e 100644 --- a/Project.toml +++ b/Project.toml @@ -2,6 +2,9 @@ name = "root" authors = ["Deltares and contributors "] description = "Meta-project used to share the Manifest of Ribasim and its dependents" +[workspace] +projects = ["core"] + [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" @@ -34,6 +37,7 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +JuliaC = "acedd4c2-ced6-4a15-accc-2607eb759ba2" JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -79,11 +83,13 @@ TestEnv = "1e6cf692-eddd-4d53-88a5-2d735e33781b" TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -[sources] -Ribasim = {path = "core"} - [compat] PythonCall = "=0.9.31" +[sources] +JuliaC = {rev = "default_cpu_target", url = "https://github.com/visr/JuliaC.jl"} +PackageCompiler = {rev = "bundle_less_artifacts", url = "https://github.com/visr/PackageCompiler.jl"} +Ribasim = {path = "core"} + [preferences.Ribasim] precompile_workload = false diff --git a/build/README.md b/build/README.md index a1d196a05..fff45490f 100644 --- a/build/README.md +++ b/build/README.md @@ -30,15 +30,10 @@ In [1]: from ctypes import CDLL, c_int, c_char_p, create_string_buffer, byref In [2]: c_dll = CDLL("libribasim", winmode=0x08) # winmode for Windows -In [3]: argument = create_string_buffer(0) - ...: c_dll.init_julia(c_int(0), byref(argument)) -Out[3]: 1 +In [3]: config_path = "ribasim.toml" -In [4]: config_path = "ribasim.toml" +In [4]: c_dll.initialize(c_char_p(config_path.encode())) +Out[4]: 0 -In [5]: c_dll.initialize(c_char_p(config_path.encode())) +In [5]: c_dll.update() Out[5]: 0 - -In [6]: c_dll.update() -Out[6]: 0 -``` diff --git a/build/build.jl b/build/build.jl index 3c04658ec..bc7f5a97f 100644 --- a/build/build.jl +++ b/build/build.jl @@ -1,27 +1,37 @@ -using Artifacts -using PackageCompiler using TOML using LibGit2 +using JuliaC +using Preferences: set_preferences!, delete_preferences! +using UUIDs: UUID +import Pkg function (@main)(_)::Cint - project_dir = "../core" - license_file = "../LICENSE" - output_dir = "ribasim" - git_repo = ".." - - # change directory to this script's location - cd(@__DIR__) - - create_library( - project_dir, - output_dir; - lib_name = "libribasim", - precompile_execution_file = "precompile.jl", - include_lazy_artifacts = false, - include_transitive_dependencies = false, - include_preferences = true, - force = true, + project_dir = "core" + license_file = "LICENSE" + output_dir = "build/ribasim" + git_repo = "." + + # Set release options in core/LocalPreferences.toml + uuid = UUID("aac5e3d9-0b8f-4d4f-8241-b1a7a9632635") # Ribasim + Pkg.activate("core") + set_preferences!(uuid, "precompile_workload" => true; force = true) + Pkg.activate(".") + + rm(output_dir; force = true, recursive = true) + + image_recipe = ImageRecipe(; + output_type = "--output-lib", + file = "build/libribasim.jl", + project = project_dir, + add_ccallables = true, + verbose = true, ) + link_recipe = LinkRecipe(; image_recipe, outname = "build/ribasim/libribasim") + bundle_recipe = BundleRecipe(; link_recipe, output_dir) + + compile_products(image_recipe) + link_products(link_recipe) + bundle_products(bundle_recipe) add_metadata(project_dir, license_file, output_dir, git_repo, readme_start) @@ -33,10 +43,16 @@ function (@main)(_)::Cint env["RUSTFLAGS"] = "-C link-args=/STACK:8388608" end - run(Cmd(`cargo build --release`; dir = "cli", env)) + run(Cmd(`cargo build --release`; dir = "build/cli", env)) ribasim = Sys.iswindows() ? "ribasim.exe" : "ribasim" - mkpath("ribasim/bin") - cp("cli/target/release/$ribasim", "ribasim/bin/$ribasim"; force = true) + mkpath("build/ribasim/bin") + cp("build/cli/target/release/$ribasim", "build/ribasim/bin/$ribasim"; force = true) + + # Restore development options in core/LocalPreferences.toml + Pkg.activate("core") + delete_preferences!(uuid, "precompile_workload"; force = true) + Pkg.activate(".") + return 0 end @@ -78,8 +94,7 @@ function add_metadata(project_dir, license_file, output_dir, git_repo, readme) TOML.print(io, dict) end - # a stripped Project.toml is already added in the same location by PackageCompiler - # however it is better to copy the original, since it includes the version and compat + # Copy the Project.toml and Manifest.toml so we can see all dependencies and versions cp( normpath(project_dir, "Project.toml"), normpath(output_dir, "share/julia/Project.toml"); @@ -129,5 +144,5 @@ function add_metadata(project_dir, license_file, output_dir, git_repo, readme) end # Override the Cargo.toml file with the git version - set_version("cli/Cargo.toml", tag) + set_version("build/cli/Cargo.toml", tag) end diff --git a/build/cli/src/main.rs b/build/cli/src/main.rs index 52d2e680a..fefe23306 100644 --- a/build/cli/src/main.rs +++ b/build/cli/src/main.rs @@ -57,11 +57,6 @@ fn main() -> ExitCode { } }; - // Init Julia - let init_julia: Symbol i32> = - lib.get(b"init_julia").unwrap(); - init_julia(0, CString::default().as_ptr()); - // Execute let execute: Symbol i32> = lib.get(b"execute").unwrap(); diff --git a/core/src/libribasim.jl b/build/libribasim.jl similarity index 98% rename from core/src/libribasim.jl rename to build/libribasim.jl index 494e5e329..f3f819e72 100644 --- a/core/src/libribasim.jl +++ b/build/libribasim.jl @@ -1,7 +1,5 @@ -module libribasim - import BasicModelInterface as BMI -import ..Ribasim +import Ribasim using SciMLBase: successful_retcode # globals @@ -233,5 +231,3 @@ function unsafe_write_to_cstring!(dest::Cstring, src::String)::Nothing unsafe_store!(dest_ptr, '\0', length(src) + 1) return nothing end - -end # module libribasim diff --git a/build/precompile.jl b/build/precompile.jl deleted file mode 100644 index bdb722f92..000000000 --- a/build/precompile.jl +++ /dev/null @@ -1,16 +0,0 @@ -# Workflow that will compile a lot of the code we will need. -# With the purpose of reducing the latency for compiled binaries. - -using Preferences, UUIDs - -uuid = UUID("aac5e3d9-0b8f-4d4f-8241-b1a7a9632635") # Ribasim - -set_preferences!(uuid, "precompile_workload" => true; force = true) -using Ribasim - -toml_path = normpath(@__DIR__, "../generated_testmodels/basic/ribasim.toml") -# This should now only take a second or less -@assert Ribasim.main(toml_path) == 0 - -# Remove preferences to avoid affecting normal Ribasim usage -set_preferences!(uuid, "precompile_workload" => missing; force = true) diff --git a/core/Project.toml b/core/Project.toml index 2efcc5c7c..49e7f849a 100644 --- a/core/Project.toml +++ b/core/Project.toml @@ -1,9 +1,11 @@ name = "Ribasim" uuid = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" authors = ["Deltares and contributors "] -manifest = "../Manifest.toml" version = "2026.1.0-rc1" +[workspace] +projects = ["test"] + [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" @@ -57,14 +59,11 @@ TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" [compat] ADTypes = "1.13" Accessors = "0.1" -Aqua = "0.8" Arrow = "2.3" BasicModelInterface = "0.1" -CSV = "0.10" CodecZstd = "0.7, 0.8" Configurations = "0.17" DBInterface = "2.4" -DataFrames = "1.4" DataInterpolations = "8.3" DataStructures = "0.18, 0.19" Dates = "1" @@ -74,10 +73,8 @@ DifferentiationInterface = "0.6.48, 0.7" EnumX = "1.0" FiniteDiff = "2.21" ForwardDiff = "0.10.38, 1" -Glob = "1.3.1" Graphs = "1.9" HiGHS = "1.7" -IOCapture = "0.2, 1" IterTools = "1.4" JuMP = "1.15" LinearAlgebra = "1" @@ -98,40 +95,20 @@ OrdinaryDiffEqSDIRK = "1.1" OrdinaryDiffEqTsit5 = "1.1" PrecompileTools = "1.2.1" Preferences = "1.4.3" -Printf = "1.11.0" +Printf = "1" SQLite = "1.5.1" SciMLBase = "2.36" SparseArrays = "1" SparseConnectivityTracer = "1" SparseMatrixColorings = "0.4.14" -Statistics = "1" StructArrays = "0.6.13, 0.7" -TOML = "1" Tables = "1" TerminalLoggers = "0.1.7" -Test = "1" -TestItemRunner = "1" TranscodingStreams = "0.9, 0.10, 0.11" -julia = "1.11" - -[extras] -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" -IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -TerminalLoggers = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" +julia = "1.12" [preferences.LinearSolve] LoadMKL_JLL = false [preferences.Ribasim] precompile_workload = false - -[targets] -test = ["Aqua", "CSV", "DataFrames", "Glob", "IOCapture", "Logging", "Statistics", "TerminalLoggers", "Test", "TOML", "TestItemRunner"] diff --git a/core/src/Ribasim.jl b/core/src/Ribasim.jl index 2e7eeaeab..4e8005167 100644 --- a/core/src/Ribasim.jl +++ b/core/src/Ribasim.jl @@ -169,8 +169,6 @@ using Printf: @sprintf using Base.Threads: @threads, nthreads -export libribasim - include("carrays.jl") using .CArrays: CVector, getaxes, getdata include("schema.jl") @@ -193,7 +191,6 @@ include("bmi.jl") include("callback.jl") include("concentration.jl") include("main.jl") -include("libribasim.jl") @setup_workload begin toml_path = normpath(@__DIR__, "../../generated_testmodels/basic/ribasim.toml") diff --git a/core/test/Project.toml b/core/test/Project.toml new file mode 100644 index 000000000..bda02af7f --- /dev/null +++ b/core/test/Project.toml @@ -0,0 +1,52 @@ +[deps] +Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" +BasicModelInterface = "59605e27-edc0-445a-b93d-c09a3a50b330" +CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" +Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" +DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" +Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" +Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" +IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36" +MetaGraphsNext = "fa8bd995-216d-47f1-8a91-f3b68fbeb377" +NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" +OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8" +OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +Ribasim = "aac5e3d9-0b8f-4d4f-8241-b1a7a9632635" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +TerminalLoggers = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" + +[sources] +Ribasim = {path = "core"} + +[compat] +Aqua = "0.8" +CSV = "0.10" +DataFrames = "1.4" +Glob = "1.3" +IOCapture = "0.2, 1" +Statistics = "1" +TOML = "1" +Test = "1" +TestItemRunner = "1" diff --git a/core/test/libribasim_test.jl b/core/test/libribasim_test.jl index c26cb019e..aac1d3ccc 100644 --- a/core/test/libribasim_test.jl +++ b/core/test/libribasim_test.jl @@ -1,4 +1,8 @@ -@testitem "libribasim" begin +@testmodule libribasim begin + include("../../build/libribasim.jl") +end + +@testitem "libribasim" setup = [libribasim] begin toml_path = normpath(@__DIR__, "../../generated_testmodels/basic/ribasim.toml") # data from which we create pointers for libribasim diff --git a/pixi.toml b/pixi.toml index f9f063e05..baa2fe520 100644 --- a/pixi.toml +++ b/pixi.toml @@ -19,7 +19,7 @@ test-ribasim-python-cov = "pytest --numprocesses=4 --cov=ribasim --cov-report=xm test-ribasim-api = "pytest --basetemp=python/ribasim_api/tests/temp --junitxml=report.xml python/ribasim_api/tests" # Installation # Keep Julia version synced with julia.executablePath in .vscode/settings.json -install-julia = "juliaup add 1.11.7 && juliaup override set 1.11.7" +install-julia = "juliaup add 1.12.3 && juliaup override set 1.12.3" install-pre-commit = "pre-commit install" # Note that this has a Windows specific override install-ci = { depends-on = ["install-julia", "update-registry-julia"] } @@ -75,7 +75,7 @@ lint = { depends-on = [ "mypy-ribasim-qgis", ] } # Build -build = { "cmd" = "julia --project --check-bounds=yes build.jl", cwd = "build", depends-on = [ +build = { "cmd" = "julia --project --check-bounds=yes build/build.jl", depends-on = [ "generate-testmodels", "initialize-julia", ] } @@ -258,10 +258,6 @@ quarto-preview = { cmd = "echo 'Skipping quarto preview on ARM64 Linux (Quarto n quarto-check = { cmd = "echo 'Skipping quarto check on ARM64 Linux (Quarto not supported)'" } quarto-render = { cmd = "echo 'Skipping quarto render on ARM64 Linux (Quarto not supported)'" } -[target.win.activation] -# Workaround a conflict between conda openssl activation and julia < 1.12 -scripts = ["utils/unset-ssl-cert.bat"] - [dependencies] datacompy = ">=0.16" geopandas = ">=1.0" diff --git a/python/ribasim_api/ribasim_api/ribasim_api.py b/python/ribasim_api/ribasim_api/ribasim_api.py index 74544e6f9..06a393fe9 100644 --- a/python/ribasim_api/ribasim_api/ribasim_api.py +++ b/python/ribasim_api/ribasim_api/ribasim_api.py @@ -1,6 +1,4 @@ # %% -from ctypes import byref, c_int, create_string_buffer - from xmipy import XmiWrapper @@ -21,13 +19,6 @@ def get_constant_int(self, name: str) -> int: return 1025 raise ValueError(f"{name} does not map to an integer exposed by Ribasim") - def init_julia(self) -> None: - argument = create_string_buffer(0) - self.lib.init_julia(c_int(0), byref(argument)) - - def shutdown_julia(self) -> None: - self.lib.shutdown_julia(c_int(0)) - def update_subgrid_level(self) -> None: self.lib.update_subgrid_level() diff --git a/python/ribasim_api/tests/conftest.py b/python/ribasim_api/tests/conftest.py index 5ed92a3c5..c9685c23a 100644 --- a/python/ribasim_api/tests/conftest.py +++ b/python/ribasim_api/tests/conftest.py @@ -6,7 +6,6 @@ from ribasim_api import RibasimApi from ribasim_testmodels import ( basic_model, - basic_transient_model, leaky_bucket_model, two_basin_model, user_demand_model, @@ -23,13 +22,6 @@ def libribasim_paths() -> tuple[Path, Path]: return lib_path, lib_folder -@pytest.fixture(scope="session", autouse=True) -def load_julia(libribasim_paths) -> None: - lib_path, lib_folder = libribasim_paths - libribasim = RibasimApi(lib_path, lib_folder) - libribasim.init_julia() - - @pytest.fixture(scope="function") def libribasim(libribasim_paths, request) -> RibasimApi: lib_path, lib_folder = libribasim_paths @@ -46,11 +38,6 @@ def basic() -> ribasim.Model: return basic_model() -@pytest.fixture(scope="session") -def basic_transient(basic) -> ribasim.Model: - return basic_transient_model(basic) - - @pytest.fixture(scope="session") def leaky_bucket() -> ribasim.Model: return leaky_bucket_model() diff --git a/utils/unset-ssl-cert.bat b/utils/unset-ssl-cert.bat deleted file mode 100644 index e926e7fd1..000000000 --- a/utils/unset-ssl-cert.bat +++ /dev/null @@ -1,6 +0,0 @@ -rem Workaround a conflict between conda openssl activation and julia, -rem until these two PRs are released: -rem https://github.com/JuliaLang/NetworkOptions.jl/pull/37 -rem https://github.com/JuliaLang/julia/pull/56924 -set SSL_CERT_FILE= -set SSL_CERT_DIR= From 1ead3797dd798bddda01c1a8486a96330601e5c8 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 29 Dec 2025 20:58:39 +0100 Subject: [PATCH 2/7] Try 1.12-nightly --- .vscode/settings.json | 2 +- pixi.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 165b66253..b627a6648 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,7 +63,7 @@ "Ribasim" ], "files.insertFinalNewline": true, - "julia.executablePath": "julia +1.12.3", + "julia.executablePath": "julia +1.12-nightly", "julia.additionalArgs": [ "--check-bounds=yes" ], diff --git a/pixi.toml b/pixi.toml index baa2fe520..2b1ce12d9 100644 --- a/pixi.toml +++ b/pixi.toml @@ -19,7 +19,7 @@ test-ribasim-python-cov = "pytest --numprocesses=4 --cov=ribasim --cov-report=xm test-ribasim-api = "pytest --basetemp=python/ribasim_api/tests/temp --junitxml=report.xml python/ribasim_api/tests" # Installation # Keep Julia version synced with julia.executablePath in .vscode/settings.json -install-julia = "juliaup add 1.12.3 && juliaup override set 1.12.3" +install-julia = "juliaup add 1.12-nightly && juliaup override set 1.12-nightly" install-pre-commit = "pre-commit install" # Note that this has a Windows specific override install-ci = { depends-on = ["install-julia", "update-registry-julia"] } From b3d45f45ed8102b8a3f66d5cda2bc538e9c41dee Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 19 Jan 2026 15:45:07 +0100 Subject: [PATCH 3/7] Use julia 1.12.4 --- .vscode/settings.json | 2 +- pixi.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b627a6648..3a9e4975a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,7 +63,7 @@ "Ribasim" ], "files.insertFinalNewline": true, - "julia.executablePath": "julia +1.12-nightly", + "julia.executablePath": "julia +1.12.4", "julia.additionalArgs": [ "--check-bounds=yes" ], diff --git a/pixi.toml b/pixi.toml index 2b1ce12d9..08b6b2676 100644 --- a/pixi.toml +++ b/pixi.toml @@ -19,7 +19,7 @@ test-ribasim-python-cov = "pytest --numprocesses=4 --cov=ribasim --cov-report=xm test-ribasim-api = "pytest --basetemp=python/ribasim_api/tests/temp --junitxml=report.xml python/ribasim_api/tests" # Installation # Keep Julia version synced with julia.executablePath in .vscode/settings.json -install-julia = "juliaup add 1.12-nightly && juliaup override set 1.12-nightly" +install-julia = "juliaup add 1.12.4 && juliaup override set 1.12.4" install-pre-commit = "pre-commit install" # Note that this has a Windows specific override install-ci = { depends-on = ["install-julia", "update-registry-julia"] } From ad9c5304e244501c5ece67c42d5c4e4482348186 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 19 Jan 2026 15:54:28 +0100 Subject: [PATCH 4/7] Update deps on branches --- Manifest.toml | 10 +++++----- Project.toml | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 6108649d2..356d49d8b 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.12.3" +julia_version = "1.12.4" manifest_format = "2.0" project_hash = "3098a4aeca387ef5ccc3c6f4042667b1fe46a752" @@ -1544,7 +1544,7 @@ version = "0.3.7" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2025.5.20" +version = "2025.11.4" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1820,11 +1820,11 @@ version = "10.44.0+1" [[deps.PackageCompiler]] deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "d01bf4dfa351e84f12c3263544011b9ba4e3d1ab" -repo-rev = "bundle_less_artifacts" +git-tree-sha1 = "a534e9dbb365973701971ec7e1779084d6d74622" +repo-rev = "bundle_less_artifacts_v1.12" repo-url = "https://github.com/visr/PackageCompiler.jl" uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -version = "2.2.2" +version = "2.2.4" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] diff --git a/Project.toml b/Project.toml index d6b72663e..2de682da3 100644 --- a/Project.toml +++ b/Project.toml @@ -83,13 +83,13 @@ TestEnv = "1e6cf692-eddd-4d53-88a5-2d735e33781b" TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -[compat] -PythonCall = "=0.9.31" - [sources] JuliaC = {rev = "default_cpu_target", url = "https://github.com/visr/JuliaC.jl"} -PackageCompiler = {rev = "bundle_less_artifacts", url = "https://github.com/visr/PackageCompiler.jl"} +PackageCompiler = {rev = "bundle_less_artifacts_v1.12", url = "https://github.com/visr/PackageCompiler.jl"} Ribasim = {path = "core"} +[compat] +PythonCall = "=0.9.31" + [preferences.Ribasim] precompile_workload = false From 11c9cfbe22c65e7e52a2f271cfc8e8c65a47c595 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 19 Jan 2026 15:59:34 +0100 Subject: [PATCH 5/7] up --- Manifest.toml | 192 ++++++++++++++++++++++---------------------------- Project.toml | 1 - 2 files changed, 85 insertions(+), 108 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 356d49d8b..300b58ad9 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -5,9 +5,9 @@ manifest_format = "2.0" project_hash = "3098a4aeca387ef5ccc3c6f4042667b1fe46a752" [[deps.ADTypes]] -git-tree-sha1 = "8b2b045b22740e4be20654175cc38291d48539db" +git-tree-sha1 = "f7304359109c768cf32dc5fa2d371565bb63b68a" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.20.0" +version = "1.21.0" weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] @@ -116,21 +116,11 @@ version = "7.22.0" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" -[[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] -git-tree-sha1 = "e0b47732a192dd59b9d079a06d04235e2f833963" -uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.12.2" -weakdeps = ["SparseArrays"] - - [deps.ArrayLayouts.extensions] - ArrayLayoutsSparseArraysExt = "SparseArrays" - [[deps.Arrow]] deps = ["ArrowTypes", "BitIntegers", "CodecLz4", "CodecZstd", "ConcurrentUtilities", "DataAPI", "Dates", "EnumX", "Mmap", "PooledArrays", "SentinelArrays", "StringViews", "Tables", "TimeZones", "TranscodingStreams", "UUIDs"] -git-tree-sha1 = "00f0b3f05bc33cc5b68db6cc22e4a7b16b65e505" +git-tree-sha1 = "4a69a3eadc1f7da78d950d1ef270c3a62c1f7e01" uuid = "69666777-d1a9-59fb-9406-91d4454c9d45" -version = "2.8.0" +version = "2.8.1" [[deps.ArrowTypes]] deps = ["Sockets", "UUIDs"] @@ -164,9 +154,9 @@ version = "0.1.9" [[deps.BitIntegers]] deps = ["Random"] -git-tree-sha1 = "226017a08355ffd3a2a1f39398297f2f232f2d67" +git-tree-sha1 = "091d591a060e43df1dd35faab3ca284925c48e46" uuid = "c3b6d118-76ef-56ca-8cc7-ebb389d030a1" -version = "0.3.6" +version = "0.3.7" [[deps.BitTwiddlingConvenienceFunctions]] deps = ["Static"] @@ -182,9 +172,9 @@ version = "1.21.7+0" [[deps.BracketingNonlinearSolve]] deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "96ee7f4f14b56ae718664af4ba665d83868a942b" +git-tree-sha1 = "750f782fcc7e09283be7d8a7aa687a95e4911b60" uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -version = "1.6.1" +version = "1.6.2" weakdeps = ["ChainRulesCore", "ForwardDiff"] [deps.BracketingNonlinearSolve.extensions] @@ -439,9 +429,9 @@ version = "1.8.1" [[deps.DataInterpolations]] deps = ["EnumX", "FindFirstFunctions", "ForwardDiff", "LinearAlgebra", "PrettyTables", "RecipesBase", "Reexport"] -git-tree-sha1 = "893dd093c76174965d003f6b011afdcbbc837986" +git-tree-sha1 = "db37d8739c369b9e7212f8e61e37611bda6fa2e1" uuid = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" -version = "8.8.0" +version = "8.9.0" [deps.DataInterpolations.extensions] DataInterpolationsChainRulesCoreExt = "ChainRulesCore" @@ -490,10 +480,10 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "146c8603444eca98b501441a5e2a412b6719209a" +deps = ["ArrayInterface", "BracketingNonlinearSolve", "ConcreteStructs", "DocStringExtensions", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "0514bf55835444420ce81f8e32c5e2369d4af456" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.194.0" +version = "6.199.0" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -529,10 +519,10 @@ version = "6.194.0" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqCallbacks]] -deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "78492306505abc7d9a78a63d52d577ec1a994c8d" +deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "LinearAlgebra", "Markdown", "PrecompileTools", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "f17b863c2d5d496363fe36c8d8535cc6a33c9952" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "4.11.0" +version = "4.12.0" [deps.DiffEqCallbacks.extensions] DiffEqCallbacksFunctorsExt = "Functors" @@ -554,9 +544,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "1d5a93ce22dfa78d202b3bd6ad8afa3d69fcd129" +git-tree-sha1 = "44d9321761ed99e1d444b5081b3166d3259adcf0" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.7.13" +version = "0.7.14" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -644,13 +634,14 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.5" [[deps.EnzymeCore]] -git-tree-sha1 = "820f06722a87d9544f42679182eb0850690f9b45" +git-tree-sha1 = "990991b8aa76d17693a98e3a915ac7aa49f08d1a" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.17" -weakdeps = ["Adapt"] +version = "0.8.18" +weakdeps = ["Adapt", "ChainRulesCore"] [deps.EnzymeCore.extensions] AdaptExt = "Adapt" + EnzymeCoreChainRulesCoreExt = "ChainRulesCore" [[deps.EpollShim_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -753,24 +744,27 @@ version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] -git-tree-sha1 = "5bfcd42851cf2f1b303f51525a54dc5e98d408a3" +git-tree-sha1 = "2f979084d1e13948a3352cf64a25df6bd3b4dca3" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.15.0" +version = "1.16.0" [deps.FillArrays.extensions] FillArraysPDMatsExt = "PDMats" FillArraysSparseArraysExt = "SparseArrays" + FillArraysStaticArraysExt = "StaticArrays" FillArraysStatisticsExt = "Statistics" [deps.FillArrays.weakdeps] PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [[deps.FindFirstFunctions]] -git-tree-sha1 = "544bdc2902fa966900d354510be775f8668a57bd" +deps = ["PrecompileTools"] +git-tree-sha1 = "1960e97427e0c1e66b603f4d047e6367a70c5d9e" uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" -version = "1.4.2" +version = "1.7.0" [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] @@ -906,9 +900,9 @@ version = "1.3.15+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "DataStructures", "Inflate", "LinearAlgebra", "Random", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "d80e8b7220b884117938b2d219487eea06f9e42e" +git-tree-sha1 = "cbf93df308fe790f9068b7e177e8baa2f46b86c9" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.13.2" +version = "1.13.3" [deps.Graphs.extensions] GraphsSharedArraysExt = "SharedArrays" @@ -1090,9 +1084,9 @@ version = "3.1.4+0" [[deps.JuMP]] deps = ["LinearAlgebra", "MacroTools", "MathOptInterface", "MutableArithmetics", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays"] -git-tree-sha1 = "b76f23c45d75e27e3e9cbd2ee68d8e39491052d0" +git-tree-sha1 = "8e4088727b5a130c12b1fedbc316306b6bbf2b9d" uuid = "4076af6c-e467-56ae-b986-b466b2749572" -version = "1.29.3" +version = "1.29.4" [deps.JuMP.extensions] JuMPDimensionalDataExt = "DimensionalData" @@ -1102,11 +1096,11 @@ version = "1.29.3" [[deps.JuliaC]] deps = ["LazyArtifacts", "Libdl", "Mmap", "ObjectFile", "PackageCompiler", "Patchelf_jll", "Pkg", "RelocatableFolders", "StructIO"] -git-tree-sha1 = "bd15b445e836f5bb4f4640746cb698fab191ab1d" +git-tree-sha1 = "95eb12ccaa00c52e376c342a0056a0a5b811caa3" repo-rev = "default_cpu_target" repo-url = "https://github.com/visr/JuliaC.jl" uuid = "acedd4c2-ced6-4a15-accc-2607eb759ba2" -version = "0.2.3" +version = "0.3.0" [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] @@ -1192,24 +1186,6 @@ git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" version = "1.3.0" -[[deps.LazyArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "70ebe3bcf87d6a1e7435ef5182c13a91161ba9b8" -uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.9.4" - - [deps.LazyArrays.extensions] - LazyArraysBandedMatricesExt = "BandedMatrices" - LazyArraysBlockArraysExt = "BlockArrays" - LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" - LazyArraysStaticArraysExt = "StaticArrays" - - [deps.LazyArrays.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" @@ -1293,10 +1269,10 @@ uuid = "726dbf0d-6eb6-41af-b36c-cd770e0f00cc" version = "0.2.3" [[deps.LineSearch]] -deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] -git-tree-sha1 = "83047a5d6a285c9acf1484ab47158ff42235a9a6" +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "9f7253c0574b4b585c8909232adb890930da980a" uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" -version = "0.1.5" +version = "0.1.6" [deps.LineSearch.extensions] LineSearchLineSearchesExt = "LineSearches" @@ -1310,10 +1286,10 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" version = "1.12.0" [[deps.LinearSolve]] -deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "651bcb90aa6927beacbcb441076f0a0feec3b4f5" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "OpenBLAS_jll", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLLogging", "SciMLOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "1fdeafa25801ec2e0caa88fbe0afd7c41d3d087a" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.55.0" +version = "3.57.0" [deps.LinearSolve.extensions] LinearSolveAMDGPUExt = "AMDGPU" @@ -1586,10 +1562,10 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.3.0" [[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "ReTestItems", "Reexport", "SciMLBase", "SciMLLogging", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "a29cf26cd3314f0be0bc04d42c6d0170dfa65d68" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SciMLLogging", "SimpleNonlinearSolve", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "5db62e7c18af752a7a5260ed7576e7429ca87be4" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "4.13.0" +version = "4.14.0" [deps.NonlinearSolve.extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -1620,9 +1596,9 @@ version = "4.13.0" [[deps.NonlinearSolveBase]] deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLLogging", "SciMLOperators", "SciMLStructures", "Setfield", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "d56195f5c82bfdfd785f403d51a5a47a7ab6d0ec" +git-tree-sha1 = "c003d5609ffc15d4181ba0578ecf83ee38dc4613" uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -version = "2.9.0" +version = "2.9.2" [deps.NonlinearSolveBase.extensions] NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" @@ -1738,9 +1714,9 @@ version = "0.5.6+0" [[deps.Opus_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" +git-tree-sha1 = "39a11854f0cba27aa41efaedf43c77c5daa6be51" uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.5.2+0" +version = "1.6.0+0" [[deps.OrderedCollections]] git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" @@ -1885,9 +1861,9 @@ version = "1.4.4" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "Unzip"] -git-tree-sha1 = "459d8913a8b83c7222eb629664283653dadfe2b6" +git-tree-sha1 = "063ef757a1e0e15af77bbe92be92da672793fd4e" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.41.3" +version = "1.41.4" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -2024,12 +2000,6 @@ deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" version = "1.11.0" -[[deps.ReTestItems]] -deps = ["Dates", "Logging", "Pkg", "Serialization", "Sockets", "Test", "TestEnv"] -git-tree-sha1 = "dbf07c2981b44bd4c5cbb6180819f7a3a43ff1d2" -uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" -version = "1.35.0" - [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -2043,10 +2013,10 @@ uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "51e1a3b5c71caf79243a98832150cad6ef125f9e" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "LinearAlgebra", "PrecompileTools", "RecipesBase", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "31b3d7b7e14faad39583475b89aadbd9c3e7ef8b" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.42.1" +version = "3.44.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -2056,6 +2026,7 @@ version = "3.42.1" RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStatisticsExt = "Statistics" RecursiveArrayToolsStructArraysExt = "StructArrays" RecursiveArrayToolsTablesExt = ["Tables"] RecursiveArrayToolsTrackerExt = "Tracker" @@ -2069,6 +2040,7 @@ version = "3.42.1" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -2098,10 +2070,10 @@ uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.1" [[deps.Revise]] -deps = ["CodeTracking", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "REPL", "Requires", "UUIDs", "Unicode"] -git-tree-sha1 = "ff0bd131abc4ebd9b66d2033144bed6d011d5074" +deps = ["CodeTracking", "FileWatching", "InteractiveUtils", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Preferences", "REPL", "UUIDs"] +git-tree-sha1 = "dfd6fab9aa325b382773b8930998ce84c2918e5e" uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.12.3" +version = "3.13.1" weakdeps = ["Distributed"] [deps.Revise.extensions] @@ -2143,16 +2115,16 @@ uuid = "0aa819cd-b072-5ff4-a722-6bc24af294d9" version = "1.6.0" [[deps.SQLite_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "9a325057cdb9b066f1f96dc77218df60fe3007cb" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll", "dlfcn_win32_jll"] +git-tree-sha1 = "0b5f220f90642566b65ba86549d1ee4118ab2579" uuid = "76ed43ae-9a5d-5a62-8c75-30186b810ce8" -version = "3.48.0+0" +version = "3.51.2+0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PreallocationTools", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLLogging", "SciMLOperators", "SciMLPublic", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "e06a8b13d3e1b9f362fa4a206322c6638c707073" +git-tree-sha1 = "9923adc7defeba6a52a99eb493ec317ac6c65942" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.130.0" +version = "2.134.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2217,15 +2189,15 @@ weakdeps = ["SparseArrays", "StaticArraysCore"] SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" [[deps.SciMLPublic]] -git-tree-sha1 = "ed647f161e8b3f2973f24979ec074e8d084f1bee" +git-tree-sha1 = "0ba076dbdce87ba230fff48ca9bca62e1f345c9b" uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" -version = "1.0.0" +version = "1.0.1" [[deps.SciMLStructures]] -deps = ["ArrayInterface"] -git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" +deps = ["ArrayInterface", "PrecompileTools"] +git-tree-sha1 = "607f6867d0b0553e98fc7f725c9f9f13b4d01a32" uuid = "53ae85a6-f571-4167-b2af-e1d143709226" -version = "1.7.0" +version = "1.10.0" [[deps.ScopedValues]] deps = ["HashArrayMappedTries", "Logging"] @@ -2382,9 +2354,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "b8693004b385c842357406e3af647701fe783f98" +git-tree-sha1 = "eee1b9ad8b29ef0d936e3ec9838c7ec089620308" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.15" +version = "1.9.16" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -2413,10 +2385,10 @@ uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" version = "1.8.0" [[deps.StatsBase]] -deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "be5733d4a2b03341bdcab91cea6caa7e31ced14b" +deps = ["AliasTables", "DataAPI", "DataStructures", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "aceda6f4e598d331548e04cc6b2124a6148138e3" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.9" +version = "0.34.10" [[deps.StrideArraysCore]] deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] @@ -2533,9 +2505,9 @@ version = "1.11.0" [[deps.TestEnv]] deps = ["Pkg"] -git-tree-sha1 = "c5bdc42698a72f9d0bd79a38b464c4265ae7d7fd" +git-tree-sha1 = "34b210bda5289c110b7df867f6a9fc26161586e2" uuid = "1e6cf692-eddd-4d53-88a5-2d735e33781b" -version = "1.103.0" +version = "1.103.2" [[deps.TestItemRunner]] deps = ["Pkg", "TOML", "Test", "TestItems", "UUIDs"] @@ -2648,9 +2620,9 @@ version = "2.13.9+0" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" +git-tree-sha1 = "9cce64c0fdd1960b597ba7ecda2950b5ed957438" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.1+0" +version = "5.8.2+0" [[deps.Xorg_libICE_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -2807,6 +2779,12 @@ git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" version = "1.5.7+1" +[[deps.dlfcn_win32_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e141d67ffe550eadfb5af1bdbdaf138031e4805f" +uuid = "c4b69c83-5512-53e3-94e6-de98773c479f" +version = "1.4.2+0" + [[deps.eudev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" @@ -2868,9 +2846,9 @@ version = "1.28.1+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "de8ab4f01cb2d8b41702bab9eaad9e8b7d352f73" +git-tree-sha1 = "6ab498eaf50e0495f89e7a5b582816e2efb95f64" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.53+0" +version = "1.6.54+0" [[deps.libvorbis_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] diff --git a/Project.toml b/Project.toml index 2de682da3..046a35121 100644 --- a/Project.toml +++ b/Project.toml @@ -84,7 +84,6 @@ TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" [sources] -JuliaC = {rev = "default_cpu_target", url = "https://github.com/visr/JuliaC.jl"} PackageCompiler = {rev = "bundle_less_artifacts_v1.12", url = "https://github.com/visr/PackageCompiler.jl"} Ribasim = {path = "core"} From c63a39db86eb68aa3e708e9dcc0740067821e622 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 19 Jan 2026 16:23:43 +0100 Subject: [PATCH 6/7] Stay on PackageCompiler, not JuliaC --- Manifest.toml | 27 +------------ Project.toml | 1 - build/build.jl | 65 ++++++++++++------------------- build/precompile.jl | 16 ++++++++ core/src/Ribasim.jl | 3 ++ {build => core/src}/libribasim.jl | 6 ++- core/test/libribasim_test.jl | 6 +-- pixi.toml | 2 +- 8 files changed, 52 insertions(+), 74 deletions(-) create mode 100644 build/precompile.jl rename {build => core/src}/libribasim.jl (98%) diff --git a/Manifest.toml b/Manifest.toml index 300b58ad9..0e3fe4fad 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.12.4" manifest_format = "2.0" -project_hash = "3098a4aeca387ef5ccc3c6f4042667b1fe46a752" +project_hash = "badd957f704270f43f2834df09918eb2df0429e1" [[deps.ADTypes]] git-tree-sha1 = "f7304359109c768cf32dc5fa2d371565bb63b68a" @@ -1094,14 +1094,6 @@ version = "1.29.4" [deps.JuMP.weakdeps] DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" -[[deps.JuliaC]] -deps = ["LazyArtifacts", "Libdl", "Mmap", "ObjectFile", "PackageCompiler", "Patchelf_jll", "Pkg", "RelocatableFolders", "StructIO"] -git-tree-sha1 = "95eb12ccaa00c52e376c342a0056a0a5b811caa3" -repo-rev = "default_cpu_target" -repo-url = "https://github.com/visr/JuliaC.jl" -uuid = "acedd4c2-ced6-4a15-accc-2607eb759ba2" -version = "0.3.0" - [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] git-tree-sha1 = "80580012d4ed5a3e8b18c7cd86cebe4b816d17a6" @@ -1652,12 +1644,6 @@ weakdeps = ["ForwardDiff"] [deps.NonlinearSolveSpectralMethods.extensions] NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" -[[deps.ObjectFile]] -deps = ["Reexport", "StructIO"] -git-tree-sha1 = "22faba70c22d2f03e60fbc61da99c4ebfc3eb9ba" -uuid = "d8793406-e978-5875-9003-1fc021f44a92" -version = "0.5.0" - [[deps.OffsetArrays]] git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" @@ -1814,12 +1800,6 @@ git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.3" -[[deps.Patchelf_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "ad1cab3e8273c912f722f40779e20f3e29d58f1f" -uuid = "f2cf89d6-2bfd-5c44-bd2c-068eea195c0c" -version = "0.18.0+0" - [[deps.Pidfile]] deps = ["FileWatching", "Test"] git-tree-sha1 = "2d8aaf8ee10df53d0dfb9b8ee44ae7c04ced2b03" @@ -2428,11 +2408,6 @@ version = "0.7.2" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.StructIO]] -git-tree-sha1 = "c581be48ae1cbf83e899b14c07a807e1787512cc" -uuid = "53d494c1-5632-5724-8f4c-31dff12d585f" -version = "0.3.1" - [[deps.StructTypes]] deps = ["Dates", "UUIDs"] git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" diff --git a/Project.toml b/Project.toml index 046a35121..95ad12f08 100644 --- a/Project.toml +++ b/Project.toml @@ -37,7 +37,6 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" -JuliaC = "acedd4c2-ced6-4a15-accc-2607eb759ba2" JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/build/build.jl b/build/build.jl index bc7f5a97f..3c04658ec 100644 --- a/build/build.jl +++ b/build/build.jl @@ -1,37 +1,27 @@ +using Artifacts +using PackageCompiler using TOML using LibGit2 -using JuliaC -using Preferences: set_preferences!, delete_preferences! -using UUIDs: UUID -import Pkg function (@main)(_)::Cint - project_dir = "core" - license_file = "LICENSE" - output_dir = "build/ribasim" - git_repo = "." - - # Set release options in core/LocalPreferences.toml - uuid = UUID("aac5e3d9-0b8f-4d4f-8241-b1a7a9632635") # Ribasim - Pkg.activate("core") - set_preferences!(uuid, "precompile_workload" => true; force = true) - Pkg.activate(".") - - rm(output_dir; force = true, recursive = true) - - image_recipe = ImageRecipe(; - output_type = "--output-lib", - file = "build/libribasim.jl", - project = project_dir, - add_ccallables = true, - verbose = true, + project_dir = "../core" + license_file = "../LICENSE" + output_dir = "ribasim" + git_repo = ".." + + # change directory to this script's location + cd(@__DIR__) + + create_library( + project_dir, + output_dir; + lib_name = "libribasim", + precompile_execution_file = "precompile.jl", + include_lazy_artifacts = false, + include_transitive_dependencies = false, + include_preferences = true, + force = true, ) - link_recipe = LinkRecipe(; image_recipe, outname = "build/ribasim/libribasim") - bundle_recipe = BundleRecipe(; link_recipe, output_dir) - - compile_products(image_recipe) - link_products(link_recipe) - bundle_products(bundle_recipe) add_metadata(project_dir, license_file, output_dir, git_repo, readme_start) @@ -43,16 +33,10 @@ function (@main)(_)::Cint env["RUSTFLAGS"] = "-C link-args=/STACK:8388608" end - run(Cmd(`cargo build --release`; dir = "build/cli", env)) + run(Cmd(`cargo build --release`; dir = "cli", env)) ribasim = Sys.iswindows() ? "ribasim.exe" : "ribasim" - mkpath("build/ribasim/bin") - cp("build/cli/target/release/$ribasim", "build/ribasim/bin/$ribasim"; force = true) - - # Restore development options in core/LocalPreferences.toml - Pkg.activate("core") - delete_preferences!(uuid, "precompile_workload"; force = true) - Pkg.activate(".") - + mkpath("ribasim/bin") + cp("cli/target/release/$ribasim", "ribasim/bin/$ribasim"; force = true) return 0 end @@ -94,7 +78,8 @@ function add_metadata(project_dir, license_file, output_dir, git_repo, readme) TOML.print(io, dict) end - # Copy the Project.toml and Manifest.toml so we can see all dependencies and versions + # a stripped Project.toml is already added in the same location by PackageCompiler + # however it is better to copy the original, since it includes the version and compat cp( normpath(project_dir, "Project.toml"), normpath(output_dir, "share/julia/Project.toml"); @@ -144,5 +129,5 @@ function add_metadata(project_dir, license_file, output_dir, git_repo, readme) end # Override the Cargo.toml file with the git version - set_version("build/cli/Cargo.toml", tag) + set_version("cli/Cargo.toml", tag) end diff --git a/build/precompile.jl b/build/precompile.jl new file mode 100644 index 000000000..bdb722f92 --- /dev/null +++ b/build/precompile.jl @@ -0,0 +1,16 @@ +# Workflow that will compile a lot of the code we will need. +# With the purpose of reducing the latency for compiled binaries. + +using Preferences, UUIDs + +uuid = UUID("aac5e3d9-0b8f-4d4f-8241-b1a7a9632635") # Ribasim + +set_preferences!(uuid, "precompile_workload" => true; force = true) +using Ribasim + +toml_path = normpath(@__DIR__, "../generated_testmodels/basic/ribasim.toml") +# This should now only take a second or less +@assert Ribasim.main(toml_path) == 0 + +# Remove preferences to avoid affecting normal Ribasim usage +set_preferences!(uuid, "precompile_workload" => missing; force = true) diff --git a/core/src/Ribasim.jl b/core/src/Ribasim.jl index 4e8005167..2e7eeaeab 100644 --- a/core/src/Ribasim.jl +++ b/core/src/Ribasim.jl @@ -169,6 +169,8 @@ using Printf: @sprintf using Base.Threads: @threads, nthreads +export libribasim + include("carrays.jl") using .CArrays: CVector, getaxes, getdata include("schema.jl") @@ -191,6 +193,7 @@ include("bmi.jl") include("callback.jl") include("concentration.jl") include("main.jl") +include("libribasim.jl") @setup_workload begin toml_path = normpath(@__DIR__, "../../generated_testmodels/basic/ribasim.toml") diff --git a/build/libribasim.jl b/core/src/libribasim.jl similarity index 98% rename from build/libribasim.jl rename to core/src/libribasim.jl index f3f819e72..494e5e329 100644 --- a/build/libribasim.jl +++ b/core/src/libribasim.jl @@ -1,5 +1,7 @@ +module libribasim + import BasicModelInterface as BMI -import Ribasim +import ..Ribasim using SciMLBase: successful_retcode # globals @@ -231,3 +233,5 @@ function unsafe_write_to_cstring!(dest::Cstring, src::String)::Nothing unsafe_store!(dest_ptr, '\0', length(src) + 1) return nothing end + +end # module libribasim diff --git a/core/test/libribasim_test.jl b/core/test/libribasim_test.jl index aac1d3ccc..c26cb019e 100644 --- a/core/test/libribasim_test.jl +++ b/core/test/libribasim_test.jl @@ -1,8 +1,4 @@ -@testmodule libribasim begin - include("../../build/libribasim.jl") -end - -@testitem "libribasim" setup = [libribasim] begin +@testitem "libribasim" begin toml_path = normpath(@__DIR__, "../../generated_testmodels/basic/ribasim.toml") # data from which we create pointers for libribasim diff --git a/pixi.toml b/pixi.toml index 08b6b2676..a5b4ab49c 100644 --- a/pixi.toml +++ b/pixi.toml @@ -75,7 +75,7 @@ lint = { depends-on = [ "mypy-ribasim-qgis", ] } # Build -build = { "cmd" = "julia --project --check-bounds=yes build/build.jl", depends-on = [ +build = { "cmd" = "julia --project --check-bounds=yes build.jl", cwd = "build", depends-on = [ "generate-testmodels", "initialize-julia", ] } From fcb3d97d6c23dfc26bf31981cec7b0c75d6f47ef Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Tue, 20 Jan 2026 13:32:33 +0100 Subject: [PATCH 7/7] Add threading fix --- Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Manifest.toml b/Manifest.toml index 0e3fe4fad..8bc6d6479 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1782,7 +1782,7 @@ version = "10.44.0+1" [[deps.PackageCompiler]] deps = ["Artifacts", "Glob", "LazyArtifacts", "Libdl", "Pkg", "Printf", "RelocatableFolders", "TOML", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "a534e9dbb365973701971ec7e1779084d6d74622" +git-tree-sha1 = "947dfecc8f7c9f7ebf2a4c8dc99b781dbf3a54f7" repo-rev = "bundle_less_artifacts_v1.12" repo-url = "https://github.com/visr/PackageCompiler.jl" uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"