From 1a7f8fc9e7645d51394c46982537b6788eff6715 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Mon, 10 Nov 2025 22:32:35 +0100 Subject: [PATCH 01/17] allow finding stdlibs that are normal packages in the manifest but are now stdlibs (#60061) This helps handling manifest from earlier julia versions. This is kind of the `locate` version of the `identify` fallback in https://github.com/JuliaLang/julia/pull/56148. Need to write a test when this happens (and verify that this fix works). Noted in a slack #gripes comment. --------- Co-authored-by: KristofferC Co-authored-by: Max Horn (cherry picked from commit 6fddac850a00441cc5d3833cc3c441132cd49a5f) --- base/loading.jl | 3 ++ test/loading.jl | 11 +++- .../project/deps/BadStdlibDeps2/Manifest.toml | 54 +++++++++++++++++++ test/project/deps/BadStdlibDeps2/Project.toml | 2 + 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 test/project/deps/BadStdlibDeps2/Manifest.toml create mode 100644 test/project/deps/BadStdlibDeps2/Project.toml diff --git a/base/loading.jl b/base/loading.jl index 316f652c78fa3..40db7df679b60 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -462,6 +462,8 @@ function locate_package_env(pkg::PkgId, stopenv::Union{String, Nothing}=nothing) path = manifest_uuid_path(env, pkg) # missing is used as a sentinel to stop looking further down in envs if path === missing + # Before stopping, try stdlib fallback + is_stdlib(pkg) && @goto stdlib_fallback path = nothing @goto done end @@ -473,6 +475,7 @@ function locate_package_env(pkg::PkgId, stopenv::Union{String, Nothing}=nothing) stopenv == env && break end end + @label stdlib_fallback # Allow loading of stdlibs if the name/uuid are given # e.g. if they have been explicitly added to the project/manifest mbypath = manifest_uuid_path(Sys.STDLIB, pkg) diff --git a/test/loading.jl b/test/loading.jl index 1a0a723eee533..a6fb433be52df 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -1414,12 +1414,21 @@ end mktempdir() do depot # This manifest has a LibGit2 entry that is missing LibGit2_jll, which should be # handled by falling back to the stdlib Project.toml for dependency truth. - badmanifest_test_dir = joinpath(@__DIR__, "project", "deps", "BadStdlibDeps.jl") + badmanifest_test_dir = joinpath(@__DIR__, "project", "deps", "BadStdlibDeps") @test success(addenv( `$(Base.julia_cmd()) --project=$badmanifest_test_dir --startup-file=no -e 'using LibGit2'`, "JULIA_DEPOT_PATH" => depot * Base.Filesystem.pathsep(), )) end + mktempdir() do depot + # This manifest has a LibGit2 entry that has a LibGit2_jll with a git-tree-hash1 + # which simulates an old manifest where LibGit2_jll was not a stdlib + badmanifest_test_dir2 = joinpath(@__DIR__, "project", "deps", "BadStdlibDeps2") + @test success(addenv( + `$(Base.julia_cmd()) --project=$badmanifest_test_dir2 --startup-file=no -e 'using LibGit2'`, + "JULIA_DEPOT_PATH" => depot * Base.Filesystem.pathsep(), + )) + end end @testset "code coverage disabled during precompilation" begin diff --git a/test/project/deps/BadStdlibDeps2/Manifest.toml b/test/project/deps/BadStdlibDeps2/Manifest.toml new file mode 100644 index 0000000000000..988efc8da56f3 --- /dev/null +++ b/test/project/deps/BadStdlibDeps2/Manifest.toml @@ -0,0 +1,54 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.12.0-DEV" +manifest_format = "2.0" +project_hash = "dc9d33b0ee13d9466bdb75b8d375808a534a79ec" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.LibGit2]] +deps = ["NetworkOptions", "Printf", "SHA", "LibGit2_jll"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +# This is an stdlib but intentionally has a git-tree-sha1 because +# we are emulating that the manifest comes from a version where +# LibGit2_jll was not an stdlib +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +git-tree-sha1 = "1111111111111111111111111111111111111111" +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.8.0+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.6+1" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" diff --git a/test/project/deps/BadStdlibDeps2/Project.toml b/test/project/deps/BadStdlibDeps2/Project.toml new file mode 100644 index 0000000000000..223889185ea15 --- /dev/null +++ b/test/project/deps/BadStdlibDeps2/Project.toml @@ -0,0 +1,2 @@ +[deps] +LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" From 45cbcd45dbb4b0b4775c798f33928cbe966850c8 Mon Sep 17 00:00:00 2001 From: deroulers Date: Thu, 13 Nov 2025 17:56:33 +0100 Subject: [PATCH 02/17] Remove precompile-time tempfiles from TEMP_CLEANUP (#60106) When starting julia, `Base.Filesystem.TEMP_CLEANUP` should be empty, but is being left with these two files. The proposed fix is to set up temporary files created by function `generate_precompile_statements` in `contrib/generate_precompile.jl` to have no automatic cleanup. This won't do harm since they will be removed by the cleanup of the temporary directory created by the call to `mktempdir` in function `generate_precompile_statements` (see the call `rm(tmpdir, recursive=true)` in `base/file.jl`). These should be removed by the atexit hook, but we didn't run `Base.__init__` or `Base.Filesystem.__postinit__` hooks to re-register this cleanup handler in the sys.so generation process (only in sysbase.so). To test this issue, one can do: `$ mkdir $TMPDIR/JuliaBuild` `$ OLDTMPDIR=$TMPDIR` `$ export TMPDIR=$TMPDIR/JuliaBuild` `$ cd ` `$ ` `$ strings usr/lib/julia/sys.dylib|less # shows that the temp. dir. JuliaBuild is hardcoded in the binaries` `$ TMPDIR=$OLDTMPDIR` `$ chmod u-x $TMPDIR/JuliaBuild` `$ # should try to use $TMPDIR/JuliaBuild which is now inaccessible` Without the fix, the last step triggers the infinite loop of ``Failed to clean up temporary path''. With the fix, one can see that the binaries (`usr/lib/julia/sys.dylib`) do not contain the temp. dir. anymore, and the infinite loop of errors is not triggered. Or simply by observing that `./julia -E 'Base.Filesystem.TEMP_CLEANUP'` is not empty. Fix #60078 (cherry picked from commit 1eea4b63334013aa1f2347b45c1a0772f108bdb0) --- contrib/generate_precompile.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 88972be56ab4d..998a77e31452a 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -348,8 +348,8 @@ generate_precompile_statements() = try # Make sure `ansi_enablecursor` is printe uuid = "$pkguuid" """) touch(joinpath(pkgpath, "Manifest.toml")) - tmp_prec = tempname(prec_path) - tmp_proc = tempname(prec_path) + tmp_prec = tempname(prec_path; cleanup=false) + tmp_proc = tempname(prec_path; cleanup=false) s = """ pushfirst!(DEPOT_PATH, $(repr(joinpath(prec_path,"depot")))); Base.PRECOMPILE_TRACE_COMPILE[] = $(repr(tmp_prec)); From 92bc6f1a1de59c6b990ad438024d82645bfe143d Mon Sep 17 00:00:00 2001 From: Cody Tapscott <84105208+topolarity@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:17:52 -0500 Subject: [PATCH 03/17] Add uninitialized multi-versioning trampoline for autoinit support (#60171) This adds a single-use autoinit trampoline for multiversioning-aliased functions. "First call" sequence: trampoline -> autoinit trampoline -> arch-specific call Subsequent calls: trampoline -> arch-specific call (cherry picked from commit b1afe0366246bb85854e1069dad96de09178771c) --- src/llvm-multiversioning.cpp | 98 ++++++++++++------- test/llvmpasses/multiversioning-clone-only.ll | 20 +++- test/llvmpasses/multiversioning-x86.ll | 2 +- 3 files changed, 80 insertions(+), 40 deletions(-) diff --git a/src/llvm-multiversioning.cpp b/src/llvm-multiversioning.cpp index 02f77298513ee..dc63cad14a1cb 100644 --- a/src/llvm-multiversioning.cpp +++ b/src/llvm-multiversioning.cpp @@ -378,6 +378,8 @@ struct CloneCtx { void clone_partial(Group &grp, Target &tgt); uint32_t get_func_id(Function *F) const; std::pair get_reloc_slot(Function *F) const; + + Function *create_trampoline(Function *F, GlobalVariable *slot, bool autoinit=false); void rewrite_alias(GlobalAlias *alias, Function* F); MDNode *tbaa_const; @@ -492,6 +494,53 @@ void CloneCtx::prepare_vmap(ValueToValueMapTy &vmap) } } +Function *CloneCtx::create_trampoline(Function *F, GlobalVariable *slot, bool autoinit) +{ + Function *trampoline = + Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage, "", &M); + + trampoline->copyAttributesFrom(F); + trampoline->setVisibility(GlobalValue::HiddenVisibility); + trampoline->setDSOLocal(true); + + // drop multiversioning attributes + trampoline->removeFnAttr("julia.mv.reloc"); + trampoline->removeFnAttr("julia.mv.clones"); + + auto BB = BasicBlock::Create(F->getContext(), "top", trampoline); + IRBuilder<> irbuilder(BB); + + if (autoinit) { + irbuilder.CreateCall(F->getParent()->getOrInsertFunction( + XSTR(jl_autoinit_and_adopt_thread), + PointerType::get(F->getContext(), 0) + )); + } + + auto ptr = irbuilder.CreateLoad(F->getType(), slot); + ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const); + ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(F->getContext(), None)); + + SmallVector Args; + for (auto &arg : trampoline->args()) + Args.push_back(&arg); + auto call = irbuilder.CreateCall(F->getFunctionType(), ptr, ArrayRef(Args)); + if (F->isVarArg()) { + assert(!TT.isARM() && !TT.isPPC() && "musttail not supported on ARM/PPC!"); + call->setTailCallKind(CallInst::TCK_MustTail); + } else { + call->setTailCallKind(CallInst::TCK_Tail); + + } + + if (F->getReturnType() == Type::getVoidTy(F->getContext())) + irbuilder.CreateRetVoid(); + else + irbuilder.CreateRet(call); + + return trampoline; +} + void CloneCtx::prepare_slots() { for (auto &F : orig_funcs) { @@ -506,7 +555,12 @@ void CloneCtx::prepare_slots() else { auto id = get_func_id(F); const_relocs[id] = GV; - GV->setInitializer(Constant::getNullValue(F->getType())); + + // Initialize with a single-use trampoline that calls `jl_autoinit_and_adopt_thread`, + // so that auto-initialization works with multi-versioned entrypoints. + Function *trampoline = create_trampoline(F, GV, /* autoinit */ true); + trampoline->setName(F->getName() + ".autoinit_trampoline"); + GV->setInitializer(trampoline); } } } @@ -664,45 +718,21 @@ void CloneCtx::rewrite_alias(GlobalAlias *alias, Function *F) { assert(!is_vector(F->getFunctionType())); - Function *trampoline = - Function::Create(F->getFunctionType(), alias->getLinkage(), "", &M); - trampoline->copyAttributesFrom(F); - trampoline->takeName(alias); - trampoline->setVisibility(alias->getVisibility()); - trampoline->setDSOLocal(alias->isDSOLocal()); - // drop multiversioning attributes, add alias attribute for testing purposes - trampoline->removeFnAttr("julia.mv.reloc"); - trampoline->removeFnAttr("julia.mv.clones"); - trampoline->addFnAttr("julia.mv.alias"); - trampoline->setDLLStorageClass(alias->getDLLStorageClass()); - alias->eraseFromParent(); - uint32_t id; GlobalVariable *slot; std::tie(id, slot) = get_reloc_slot(F); + assert(slot); - auto BB = BasicBlock::Create(F->getContext(), "top", trampoline); - IRBuilder<> irbuilder(BB); + Function *trampoline = create_trampoline(F, slot, /* autoinit */ false); + trampoline->addFnAttr("julia.mv.alias"); // add alias attribute for testing purposes - auto ptr = irbuilder.CreateLoad(F->getType(), slot); - ptr->setMetadata(llvm::LLVMContext::MD_tbaa, tbaa_const); - ptr->setMetadata(llvm::LLVMContext::MD_invariant_load, MDNode::get(F->getContext(), None)); - - SmallVector Args; - for (auto &arg : trampoline->args()) - Args.push_back(&arg); - auto call = irbuilder.CreateCall(F->getFunctionType(), ptr, ArrayRef(Args)); - if (F->isVarArg()) { - assert(!TT.isARM() && !TT.isPPC() && "musttail not supported on ARM/PPC!"); - call->setTailCallKind(CallInst::TCK_MustTail); - } else { - call->setTailCallKind(CallInst::TCK_Tail); - } + trampoline->takeName(alias); + trampoline->setLinkage(alias->getLinkage()); + trampoline->setVisibility(alias->getVisibility()); + trampoline->setDSOLocal(alias->isDSOLocal()); + trampoline->setDLLStorageClass(alias->getDLLStorageClass()); - if (F->getReturnType() == Type::getVoidTy(F->getContext())) - irbuilder.CreateRetVoid(); - else - irbuilder.CreateRet(call); + alias->eraseFromParent(); } void CloneCtx::fix_gv_uses() diff --git a/test/llvmpasses/multiversioning-clone-only.ll b/test/llvmpasses/multiversioning-clone-only.ll index 00f0db0aa1e91..c4f5257a59988 100644 --- a/test/llvmpasses/multiversioning-clone-only.ll +++ b/test/llvmpasses/multiversioning-clone-only.ll @@ -7,7 +7,7 @@ ; CHECK: @jl_fvar_idxs = hidden constant [1 x i32] zeroinitializer ; CHECK: @jl_gvar_idxs = hidden constant [0 x i32] zeroinitializer ; OPAQUE: @subtarget_cloned_gv = hidden global ptr null -; OPAQUE: @subtarget_cloned.reloc_slot = hidden global ptr null +; OPAQUE: @subtarget_cloned.reloc_slot = hidden global ptr @subtarget_cloned.autoinit_trampoline ; CHECK: @jl_fvar_count = hidden constant i64 1 ; OPAQUE: @jl_fvar_ptrs = hidden global [1 x ptr] [ptr @subtarget_cloned] ; CHECK: @jl_clone_slots = hidden constant [5 x i32] @@ -57,7 +57,7 @@ define noundef i32 @subtarget_cloned(i32 noundef %0) #2 { ; COM: should fixup this callsite since 2 is cloned for a subtarget ; CHECK: define{{.*}}@call_subtarget_cloned({{.*}}#[[CALL_SUBTARGET_CLONED_DEFAULT_ATTRS:[0-9]+]] ; CHECK-NEXT: [[FUNC_PTR:%[0-9]+]] = load{{.*}}@subtarget_cloned.reloc_slot{{.*}}!tbaa ![[TBAA_CONST_METADATA:[0-9]+]], !invariant.load -; CHECK-NEXT: call{{.*}}[[FUNC_PTR]] +; CHECK-NEXT: call{{.*}}[[FUNC_PTR]]({{.*}}) ; CHECK: ret i32 define noundef i32 @call_subtarget_cloned(i32 noundef %0) #3 { %2 = call noundef i32 @subtarget_cloned(i32 noundef %0) @@ -66,13 +66,23 @@ define noundef i32 @call_subtarget_cloned(i32 noundef %0) #3 { ; CHECK: define{{.*}}@call_subtarget_cloned_but_not_cloned({{.*}}#[[BORING_DEFAULT_ATTRS]] ; CHECK-NEXT: [[FUNC_PTR:%[0-9]+]] = load{{.*}}@subtarget_cloned.reloc_slot{{.*}}!tbaa ![[TBAA_CONST_METADATA]], !invariant.load -; CHECK-NEXT: call{{.*}}[[FUNC_PTR]] +; CHECK-NEXT: call{{.*}}[[FUNC_PTR]]({{.*}}) ; CHECK: ret i32 define noundef i32 @call_subtarget_cloned_but_not_cloned(i32 noundef %0) #0 { %2 = call noundef i32 @subtarget_cloned(i32 noundef %0) ret i32 %2 } +; COM: check that the autoinit trampoline is generated correctly +; CHECK: define{{.*}}@subtarget_cloned.autoinit_trampoline({{.*}} +; CHECK-NEXT: top: +; CHECK-NEXT: call ptr @ijl_autoinit_and_adopt_thread() +; CHECK-NEXT: [[FUNC_PTR:%[0-9]+]] = load ptr, ptr @subtarget_cloned.reloc_slot{{.*}}!tbaa ![[TBAA_CONST_METADATA]], !invariant.load +; CHECK-NEXT: call{{.*}}[[FUNC_PTR]]({{.*}}) +; CHECK: ret i32 + +declare ptr @ijl_autoinit_and_adopt_thread() + ; CHECK: define{{.*}}@boring.1({{.*}}#[[BORING_CLONEALL_ATTRS:[0-9]+]] ; CHECK-NEXT: ret i32 %0 @@ -106,10 +116,10 @@ define noundef i32 @call_subtarget_cloned_but_not_cloned(i32 noundef %0) #0 { ; CHECK-NOT: @subtarget_cloned_but_not_cloned.2 ; COM: check for alias being rewritten to a function trampoline -; CHECK: define{{.*}}@subtarget_cloned_aliased{{.*}}#[[SUBTARGET_ALIASED_ATTRS:[0-9]+]] +; CHECK: define{{.*}}@subtarget_cloned_aliased{{[^.]*}}#[[SUBTARGET_ALIASED_ATTRS:[0-9]+]] ; CHECK-NOT: } ; CHECK: [[FUNC_PTR:%[0-9]+]] = load{{.*}}@subtarget_cloned.reloc_slot{{.*}}!tbaa ![[TBAA_CONST_METADATA]], !invariant.load -; CHECK-NEXT: call{{.*}}[[FUNC_PTR]] +; CHECK-NEXT: call{{.*}}[[FUNC_PTR]]({{.*}}) ; CHECK: ret i32 ; CHECK: attributes #[[BORING_DEFAULT_ATTRS]] diff --git a/test/llvmpasses/multiversioning-x86.ll b/test/llvmpasses/multiversioning-x86.ll index ff4a8abba5252..e2918d0c20eec 100644 --- a/test/llvmpasses/multiversioning-x86.ll +++ b/test/llvmpasses/multiversioning-x86.ll @@ -11,7 +11,7 @@ ; OPAQUE: @jl_gvar_ptrs = global [0 x ptr] zeroinitializer, align 8 ; CHECK: @jl_fvar_idxs = hidden constant [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4], align 8 ; CHECK: @jl_gvar_idxs = hidden constant [0 x i32] zeroinitializer, align 8 -; OPAQUE: @simd_test.reloc_slot = hidden global ptr null +; OPAQUE: @simd_test.reloc_slot = hidden global ptr @simd_test.autoinit_trampoline ; OPAQUE: @jl_fvar_ptrs = hidden global [5 x ptr] [ptr @boring, ptr @fastmath_test, ptr @loop_test, ptr @simd_test, ptr @simd_test_call] ; OPAQUE: @jl_clone_slots = hidden constant [3 x i32] [i32 1, i32 3, i32 trunc (i64 sub (i64 ptrtoint (ptr @simd_test.reloc_slot to i64), i64 ptrtoint (ptr @jl_clone_slots to i64)) to i32)] ; CHECK: @jl_clone_idxs = hidden constant [10 x i32] [i32 -2147483647, i32 3, i32 -2147483647, i32 3, i32 4, i32 1, i32 1, i32 2, i32 -2147483645, i32 4] From 6b14a99517b82487427dd925512622cd848c3293 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 21 Nov 2025 12:09:20 +0100 Subject: [PATCH 04/17] Better order for stdlibs in the Julia manual navbar (#60155) Resolves #50351 albeit with a bit of a hack. I deliberately left "The Julia REPL" alone (so it is still sorted under "REPL") as that felt more natural to me compared to sorting it under "Julia" but obviously this could easily be changed as well. (cherry picked from commit 9af9b15844705c0d82fcf3ba4878e5e0e2983982) --- doc/make.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/make.jl b/doc/make.jl index 6379bf8dae7bf..dd847b834aa8e 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -202,6 +202,15 @@ BaseDocs = [ StdlibDocs = [stdlib.targetfile for stdlib in STDLIB_DOCS] +# HACK: get nicer sorting here, even though we don't have the header +# of the .md files at hand. +sort!(StdlibDocs, by=function(x) + x = replace(x, "stdlib/" => "") + startswith(x, "Libdl") && return lowercase("Dynamic Linker") + startswith(x, "Test") && return lowercase("Unit Testing") + return lowercase(x) +end) + DevDocs = [ "Documentation of Julia's Internals" => [ "devdocs/init.md", From 6c89d07dea4f58b32646ff5e33a79c52b5d4738f Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 27 Nov 2025 17:40:49 +0530 Subject: [PATCH 05/17] [release-1.12] Fix namespace of `IOError` in `random_seed` (#59690) This PR addresses an issue with `IOError` not being exported from `Base` and therefore being unavailable within `Random` if not fully qualified. I'm not entirely certain which branch to make this PR to: `release-1.12` or `backports-release-1.12`. Please change the target branch to the appropriate one if necessary. --- stdlib/Random/src/RNGs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index 2ea2fb3a684df..6c8fc684d8e53 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -287,7 +287,7 @@ function random_seed() # almost surely always getting distinct seeds, while having them printed reasonably tersely return rand(RandomDevice(), UInt128) catch ex - ex isa IOError || rethrow() + ex isa Base.IOError || rethrow() @warn "Entropy pool not available to seed RNG; using ad-hoc entropy sources." return Libc.rand() end From b224ba6ebe465f618a84734c4a5c2c0bc84d1ee5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 27 Nov 2025 16:27:45 +0100 Subject: [PATCH 06/17] Backport to 1.12: bump Documenter to 1.16.1 (#60217) Backport of PR #60215. --- doc/Manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Manifest.toml b/doc/Manifest.toml index 03723f59149bc..647379062502f 100644 --- a/doc/Manifest.toml +++ b/doc/Manifest.toml @@ -49,9 +49,9 @@ version = "0.9.5" [[deps.Documenter]] deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] -git-tree-sha1 = "70c521ca3a23c576e12655d15963977c9766c26b" +git-tree-sha1 = "b37458ae37d8bdb643d763451585cd8d0e5b4a9e" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.16.0" +version = "1.16.1" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] From 949afc69237d33b66dce3b70646e08304424e5f5 Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Fri, 28 Nov 2025 06:16:58 -0500 Subject: [PATCH 07/17] =?UTF-8?q?=F0=9F=A4=96=20[backports-release-1.12]?= =?UTF-8?q?=20Bump=20LinearAlgebra=20stdlib=205567504=20=E2=86=92=20997c4b?= =?UTF-8?q?7=20(#60272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/LinearAlgebra.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/md5 delete mode 100644 deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/sha512 create mode 100644 deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/md5 create mode 100644 deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/sha512 diff --git a/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/md5 b/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/md5 deleted file mode 100644 index 0b24489826784..0000000000000 --- a/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -e9b0f2123d80968562e410dab5d18fce diff --git a/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/sha512 b/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/sha512 deleted file mode 100644 index 999958331e4a1..0000000000000 --- a/deps/checksums/LinearAlgebra-5567504893591e552f08cc08353b285182a1c8cc.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -b258fb01851417aa0f17615ce4bfcd501aa1ad3add465ca455fb9f2556df9844ad93ba8f946fd44075b2028a929c0155b8ab7e86a000e162f6600332418f23f4 diff --git a/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/md5 b/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/md5 new file mode 100644 index 0000000000000..0981743e0907a --- /dev/null +++ b/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/md5 @@ -0,0 +1 @@ +1cf83c7ea8935ac0804e07ebe8ce7506 diff --git a/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/sha512 b/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/sha512 new file mode 100644 index 0000000000000..971b146eecf64 --- /dev/null +++ b/deps/checksums/LinearAlgebra-997c4b7e7664f30645ef8bd51d8a4203e49c4631.tar.gz/sha512 @@ -0,0 +1 @@ +ec3edd7208e25fb1af0b9cb2324abbfb66e556442b75df619ffdf428f1d59f851055117db896fd3514352a32c34c4c42cf50e1386deca4ebd051de98369d5a3e diff --git a/stdlib/LinearAlgebra.version b/stdlib/LinearAlgebra.version index 7d7904e1f708c..3b1f7cc5847d9 100644 --- a/stdlib/LinearAlgebra.version +++ b/stdlib/LinearAlgebra.version @@ -1,4 +1,4 @@ LINEARALGEBRA_BRANCH = release-1.12 -LINEARALGEBRA_SHA1 = 5567504893591e552f08cc08353b285182a1c8cc +LINEARALGEBRA_SHA1 = 997c4b7e7664f30645ef8bd51d8a4203e49c4631 LINEARALGEBRA_GIT_URL := https://github.com/JuliaLang/LinearAlgebra.jl.git LINEARALGEBRA_TAR_URL = https://api.github.com/repos/JuliaLang/LinearAlgebra.jl/tarball/$1 From 7ea108b983571ba9d206a816d7ee6cfcf863cd44 Mon Sep 17 00:00:00 2001 From: green-br Date: Thu, 16 Oct 2025 14:55:16 +0100 Subject: [PATCH 08/17] Mmap fix on system with 64k pagesize. (#59695) Not sure if this is the best approach but seemed to allow Mmap test to pass. Seems the pagesize was being set to value at build-time rather than being re-evaluated at runtime. Running Mmap tests on system with 64k pagesize, Mmap would still think its on a system with 4k pagesize and therefore fail. --------- Co-authored-by: Jameson Nash (cherry picked from commit db003be110a6a530a39c6c91e11d0d26a66ad18d) --- base/sysinfo.jl | 9 +++++++++ stdlib/Mmap/src/Mmap.jl | 3 +-- stdlib/Mmap/test/runtests.jl | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/base/sysinfo.jl b/base/sysinfo.jl index c96c318ec053b..f84b00ca324c6 100644 --- a/base/sysinfo.jl +++ b/base/sysinfo.jl @@ -14,6 +14,7 @@ export BINDIR, MACHINE, KERNEL, JIT, + PAGESIZE, cpu_info, cpu_summary, uptime, @@ -143,6 +144,13 @@ Note: Included in the detailed system information via `versioninfo(verbose=true) """ global JIT::String +""" + Sys.PAGESIZE::Clong + +A number providing the pagesize of the given OS. Common values being 4kb or 64kb on Linux. +""" +global PAGESIZE::Clong + function __init__() env_threads = nothing if haskey(ENV, "JULIA_CPU_THREADS") @@ -161,6 +169,7 @@ function __init__() global SC_CLK_TCK = ccall(:jl_SC_CLK_TCK, Clong, ()) global CPU_NAME = ccall(:jl_get_cpu_name, Ref{String}, ()) global JIT = ccall(:jl_get_JIT, Ref{String}, ()) + global PAGESIZE = Int(Sys.isunix() ? ccall(:jl_getpagesize, Clong, ()) : ccall(:jl_getallocationgranularity, Clong, ())) __init_build() nothing end diff --git a/stdlib/Mmap/src/Mmap.jl b/stdlib/Mmap/src/Mmap.jl index fb6bb72026588..806abc714d391 100644 --- a/stdlib/Mmap/src/Mmap.jl +++ b/stdlib/Mmap/src/Mmap.jl @@ -6,11 +6,10 @@ Low level module for mmap (memory mapping of files). module Mmap import Base: OS_HANDLE, INVALID_OS_HANDLE +using Base.Sys: PAGESIZE export mmap -const PAGESIZE = Int(Sys.isunix() ? ccall(:jl_getpagesize, Clong, ()) : ccall(:jl_getallocationgranularity, Clong, ())) - # for mmaps not backed by files mutable struct Anonymous <: IO name::String diff --git a/stdlib/Mmap/test/runtests.jl b/stdlib/Mmap/test/runtests.jl index d129c0ee94295..375a249721400 100644 --- a/stdlib/Mmap/test/runtests.jl +++ b/stdlib/Mmap/test/runtests.jl @@ -267,6 +267,7 @@ A2 = mmap(s, Matrix{Int}, (m,n)) seek(s, 0) A3 = mmap(s, Matrix{Int}, (m,n), convert(Int64, 2*sizeof(Int))) @test A == A3 +seek(s, 0) A4 = mmap(s, Matrix{Int}, (m,150), convert(Int64, (2+150*m)*sizeof(Int))) @test A[:, 151:end] == A4 close(s) From 2ddde018cb0aa49fb8caee2b000740bc1b4ebc68 Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Tue, 25 Nov 2025 04:29:42 -0500 Subject: [PATCH 09/17] Remove list of stdlibs on the intro page (#60219) Fix #59786 Many of these links do not even exist and are broken. But even then, it is simply not the right place for such deep dive content. Co-authored-by: Viral B. Shah (cherry picked from commit 6d6224db9959791b05772072426bfcb7614ea0ce) --- doc/src/index.md | 54 +++++++----------------------------------------- 1 file changed, 8 insertions(+), 46 deletions(-) diff --git a/doc/src/index.md b/doc/src/index.md index 7d781f25b4235..dea0c11dc1c8b 100644 --- a/doc/src/index.md +++ b/doc/src/index.md @@ -32,18 +32,6 @@ Markdown.parse(""" """) ``` -## [Important Links](@id man-important-links) - -Below is a non-exhaustive list of links that will be useful as you learn and use the Julia programming language. - -- [Julia Homepage](https://julialang.org) -- [Install Julia](https://julialang.org/install/) -- [Discussion forum](https://discourse.julialang.org) -- [Julia YouTube](https://www.youtube.com/user/JuliaLanguage) -- [Find Julia Packages](https://julialang.org/packages/) -- [Learning Resources](https://julialang.org/learning/) -- [Read and write blogs on Julia](https://forem.julialang.org) - ## [Introduction](@id man-introduction) Scientific computing has traditionally required the highest performance, yet domain experts have @@ -127,39 +115,13 @@ language. In addition to the above, some advantages of Julia over comparable sys * Powerful shell-like capabilities for managing other processes * Lisp-like macros and other metaprogramming facilities -## [Julia Standard Modules and the Standard Library](@id man-standard-modules-stdlib) - -The Julia runtime comes with [standard modules](@ref standard-modules), -which are essential namespaces that are usually loaded automatically. - -```@docs; canonical=false -Core -Base -``` - -Julia's `Base` module contains various [useful submodules](@ref base-submodules). - -### [The Standard Library](@id man-stdlib) - -The Julia standard library contains additional, commonly used packages that are installed alongside the Julia runtime by default. -To use a standard library package, it is first necessary to load the package with a [`using`](@ref) or [`import`](@ref) statement. -Links to available standard library packages are provided below, -and may also be found in the website sidebar. -Their source code is available in the `Sys.STDLIB` directory of a Julia installation. - -```@eval -import Markdown -list = sort(filter(x -> match(r"_jll$", x) === nothing, readdir(Sys.STDLIB))) -Markdown.parse(join("- [`" .* list .* "`](stdlib/" .* list .* ".html)", "\n")) -``` +## [Important Links](@id man-important-links) -Julia also provides various standard, pre-built binary libraries -of established software that is written in other languages. -By convention, these packages have names that end with `_jll`. -The [`using`](@ref) statement can load symbol names from these binary libraries: +A non-exhaustive list of links that will be useful as you learn and use the Julia programming language: -```@eval -import Markdown -list = sort(filter(x -> match(r"_jll$", x) !== nothing, readdir(Sys.STDLIB))) -Markdown.parse(join("- [`" .* list .* "`](stdlib/" .* list .* ".html)", "\n")) -``` +- [Julia Homepage](https://julialang.org) +- [Install Julia](https://julialang.org/install/) +- [Discussion forum](https://discourse.julialang.org) +- [Julia YouTube](https://www.youtube.com/user/JuliaLanguage) +- [Find Julia Packages](https://julialang.org/packages/) +- [Learning Resources](https://julialang.org/learning/) From 013c7af642abad475db4cb9cf24a4a9cc6be9d4c Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 31 Oct 2025 20:55:07 -0600 Subject: [PATCH 10/17] cgutils: fix write barrier of atomic-setonce (#59991) Thanks to PermutationGroups.jl for dog-fooding our typos! This now matches the runtime implementation in datatype.c (setonce_bits) and ensures that we properly compute the success bit. The test that was intended to check for this is now written to inline that struct and thus actually test for this (undef fields are not eligible for inlining). Fix #59883 (cherry picked from commit c5553c968d3e16ddf9616c016b8663441f73f40b) --- src/cgutils.cpp | 6 ++++-- test/atomics.jl | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 138fa54949cf8..65a01c1355f76 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -2634,10 +2634,12 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, assert(!isboxed && maybe_null_if_boxed); Value *first_ptr = extract_first_ptr(ctx, realinstr); assert(first_ptr != nullptr); - Done = ctx.builder.CreateIsNotNull(first_ptr); + // Done = Success || first_ptr != NULL + Done = ctx.builder.CreateOr(Success, ctx.builder.CreateIsNotNull(first_ptr)); } else { - // Done = !(!Success && (first_ptr != NULL && oldval == cmp)) + // Done = Success || first_ptr == NULL || oldval == cmpop) + // Done = !(!Success && (first_ptr != NULL && oldval == cmpop)) Done = emit_guarded_test(ctx, ctx.builder.CreateNot(Success), false, [&] { Value *first_ptr = nullptr; if (maybe_null_if_boxed) diff --git a/test/atomics.jl b/test/atomics.jl index 3572824741459..369a63f7d5fbf 100644 --- a/test/atomics.jl +++ b/test/atomics.jl @@ -57,9 +57,8 @@ swap(x, y) = y struct UndefComplex{T} re::T im::T - UndefComplex{T}() where {T} = new{T}() end -Base.convert(T::Type{<:UndefComplex}, S) = T() +Base.convert(T::Type{<:UndefComplex}, S) = T(S, 0) let T1 = Refxy{NTuple{3,UInt8}}, T2 = ARefxy{NTuple{3,UInt8}} From 11014f6a01ba19b3f220116da4d8d916f8442522 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 11 Nov 2025 06:22:06 -0500 Subject: [PATCH 11/17] deps: fix rpath of 7z after moving to libexecdir (#60098) (cherry picked from commit 8795edd7d6399ea928f275f12c213a55deca078e) --- Make.inc | 4 ++++ deps/Makefile | 2 ++ deps/p7zip.mk | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Make.inc b/Make.inc index 32c3cd4595a20..c2ccf6757e3c9 100644 --- a/Make.inc +++ b/Make.inc @@ -381,6 +381,10 @@ $(foreach D,build_libdir build_private_libdir,$(eval $(call cache_rel_path,$(D), # Save a special one: reverse_private_libdir_rel: usually just `../`, but good to be general: reverse_private_libdir_rel_eval = $(call rel_path,$(private_libdir),$(libdir)) reverse_private_libdir_rel = $(call hit_cache,reverse_private_libdir_rel_eval) +reverse_private_libexecdir_rel_eval = $(call rel_path,$(private_libexecdir),$(libdir)) +reverse_private_libexecdir_rel = $(call hit_cache,reverse_private_libexecdir_rel_eval) +reverse_build_private_libexecdir_rel_eval = $(call rel_path,$(build_private_libexecdir),$(build_libdir)) +reverse_build_private_libexecdir_rel = $(call hit_cache,reverse_build_private_libexecdir_rel_eval) INSTALL_F := $(JULIAHOME)/contrib/install.sh 644 INSTALL_M := $(JULIAHOME)/contrib/install.sh 755 diff --git a/deps/Makefile b/deps/Makefile index 396b1021c2ddd..cc22b709677fb 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -72,10 +72,12 @@ endif endif endif +PATCHELF_MANIFEST := ifneq (,$(findstring $(OS),Linux FreeBSD OpenBSD)) ifeq ($(USE_SYSTEM_PATCHELF), 0) DEP_LIBS += patchelf PATCHELF:=$(build_depsbindir)/patchelf +PATCHELF_MANIFEST:=$(build_prefix)/manifest/patchelf else PATCHELF:=patchelf endif diff --git a/deps/p7zip.mk b/deps/p7zip.mk index 006062f2932a2..5015edbfc2ba3 100644 --- a/deps/p7zip.mk +++ b/deps/p7zip.mk @@ -51,10 +51,14 @@ $(eval $(call bb-install,p7zip,P7ZIP,false)) # move from bindir to shlibdir, where we expect to install it install-p7zip: post-install-p7zip uninstall-p7zip: pre-uninstall-p7zip -post-install-p7zip: $(build_prefix)/manifest/p7zip +post-install-p7zip: $(build_prefix)/manifest/p7zip $(PATCHELF_MANIFEST) mkdir -p $(build_private_libexecdir)/ [ ! -e $(build_bindir)/7z$(EXE) ] || mv $(build_bindir)/7z$(EXE) $(build_private_libexecdir)/7z$(EXE) [ -e $(build_private_libexecdir)/7z$(EXE) ] +ifneq (,$(findstring $(OS),Linux FreeBSD)) + [ -L $(build_private_libexecdir)/7z ] || \ + $(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(reverse_build_private_libexecdir_rel)' $(build_private_libexecdir)/7z$(EXE) +endif pre-uninstall-p7zip: -rm -f $(build_private_libexecdir)/7z$(EXE) From 15388778f3fe389a5911b2aaf8269a5e502f2164 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sat, 29 Nov 2025 13:40:07 +0100 Subject: [PATCH 12/17] bump Pkg to latest 1.12 --- .../Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/md5 | 1 + .../Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/sha512 | 1 + .../Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/md5 | 1 - .../Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/md5 create mode 100644 deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/sha512 diff --git a/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/md5 b/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/md5 new file mode 100644 index 0000000000000..48b17f7ee32d2 --- /dev/null +++ b/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/md5 @@ -0,0 +1 @@ +5c898e09839cfa16f80940b08bdebe9f diff --git a/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/sha512 b/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/sha512 new file mode 100644 index 0000000000000..7236505c4e9f1 --- /dev/null +++ b/deps/checksums/Pkg-53b2b5da91c27515ce129635fe184e8bd9afb09f.tar.gz/sha512 @@ -0,0 +1 @@ +5202b09eaf172291260bc69a28944986c80a4362a9ef521b05c8ce95c69c9909439b5b2f3a52326ab820f1eff2e1ba2a8ddaa90080d9e29fd2f6e226856bda3e diff --git a/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/md5 b/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/md5 deleted file mode 100644 index 349a481e56cbf..0000000000000 --- a/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -91c3111e1d5c6bd5e6327ded2537ef68 diff --git a/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/sha512 b/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/sha512 deleted file mode 100644 index f733ab37373b0..0000000000000 --- a/deps/checksums/Pkg-98a52b1ccf470daf6aafa9483e8246eede98292d.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -c9ca5f0899dbe187b6c009acafd51f067dbb7b86dabceb85d0c65b8f5243d76e3eb9f0c17182049100608b3de726d3c738a323901863443ac09fe6d7baa1ff3f diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 8225cb5fe32d4..6feeb870e2f20 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,4 +1,4 @@ PKG_BRANCH = release-1.12 -PKG_SHA1 = 98a52b1ccf470daf6aafa9483e8246eede98292d +PKG_SHA1 = 53b2b5da91c27515ce129635fe184e8bd9afb09f PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1 From 89c2a4e6922574ed86bf3fc0373626737a8c33ab Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 23 Jul 2025 06:35:42 -0400 Subject: [PATCH 13/17] build: More msys2 fixes (#59028) --- contrib/mac/app/Makefile | 4 ++-- deps/libgit2.mk | 11 ++++++++++- deps/libssh2.mk | 5 +---- deps/libuv.mk | 2 +- deps/llvm.mk | 8 ++++++++ deps/openssl.mk | 18 ++++++++---------- deps/tools/common.mk | 24 ++++++++++++++++++++++-- src/Makefile | 12 +++++++----- src/flisp/Makefile | 2 +- 9 files changed, 60 insertions(+), 26 deletions(-) diff --git a/contrib/mac/app/Makefile b/contrib/mac/app/Makefile index 81b7e47cdf2cf..70436a857c265 100644 --- a/contrib/mac/app/Makefile +++ b/contrib/mac/app/Makefile @@ -47,8 +47,8 @@ dmg/$(APP_NAME): startup.applescript julia.icns plutil -insert CFBundleVersion -string "$(JULIA_VERSION_OPT_COMMIT)" $@/Contents/Info.plist plutil -insert NSHumanReadableCopyright -string "$(APP_COPYRIGHT)" $@/Contents/Info.plist -mkdir -p $@/Contents/Resources/julia - make -C $(JULIAHOME) binary-dist - tar zxf $(JULIAHOME)/$(JULIA_BINARYDIST_FILENAME).tar.gz -C $@/Contents/Resources/julia --strip-components 1 + $(MAKE) -C $(JULIAHOME) binary-dist + $(TAR) -xzf $(JULIAHOME)/$(JULIA_BINARYDIST_FILENAME).tar.gz -C $@/Contents/Resources/julia --strip-components 1 find $@/Contents/Resources/julia -type f -exec chmod -w {} \; # Even though the tarball may already be signed, we re-sign here to make it easier to add # unsigned executables (like the app launcher) and whatnot, without needing to maintain lists diff --git a/deps/libgit2.mk b/deps/libgit2.mk index 8b17ae6d70424..dd0d883c2e736 100644 --- a/deps/libgit2.mk +++ b/deps/libgit2.mk @@ -4,6 +4,7 @@ ifneq ($(USE_BINARYBUILDER_LIBGIT2),1) LIBGIT2_GIT_URL := https://github.com/libgit2/libgit2.git LIBGIT2_TAR_URL = https://api.github.com/repos/libgit2/libgit2/tarball/$1 $(eval $(call git-external,libgit2,LIBGIT2,CMakeLists.txt,,$(SRCCACHE))) +$(SRCCACHE)/$(LIBGIT2_SRC_DIR)/source-extracted: $(MSYS_NONEXISTENT_SYMLINK_TARGET_FIX) ifeq ($(USE_SYSTEM_LIBSSH2), 0) $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/libssh2 @@ -13,7 +14,15 @@ ifeq ($(USE_SYSTEM_OPENSSL), 0) $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/openssl endif -LIBGIT2_OPTS := $(CMAKE_COMMON) -DCMAKE_BUILD_TYPE=Release -DUSE_THREADS=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DBUILD_CLI=OFF +ifeq ($(USE_SYSTEM_PCRE), 0) +$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/pcre +endif + +ifeq ($(USE_SYSTEM_ZLIB), 0) +$(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: | $(build_prefix)/manifest/zlib +endif + +LIBGIT2_OPTS := $(CMAKE_COMMON) -DCMAKE_BUILD_TYPE=Release -DUSE_THREADS=ON -DUSE_BUNDLED_ZLIB=OFF -DUSE_SSH=ON -DREGEX_BACKEND=pcre2 -DBUILD_CLI=OFF -DBUILD_TESTS=OFF ifeq ($(OS),WINNT) LIBGIT2_OPTS += -DWIN32=ON -DMINGW=ON ifeq ($(USE_SYSTEM_LIBSSH2), 0) diff --git a/deps/libssh2.mk b/deps/libssh2.mk index 661e26516c828..05cc12b6e159b 100644 --- a/deps/libssh2.mk +++ b/deps/libssh2.mk @@ -17,9 +17,6 @@ endif ifeq ($(OS),WINNT) LIBSSH2_OPTS += -DCRYPTO_BACKEND=WinCNG -DENABLE_ZLIB_COMPRESSION=OFF -ifeq ($(BUILD_OS),WINNT) -LIBSSH2_OPTS += -G"MSYS Makefiles" -endif else LIBSSH2_OPTS += -DCRYPTO_BACKEND=OpenSSL -DENABLE_ZLIB_COMPRESSION=OFF LIBSSH2_OPTS += -DOPENSSL_ROOT_DIR=$(build_prefix) @@ -38,7 +35,7 @@ LIBSSH2_SRC_PATH := $(SRCCACHE)/$(LIBSSH2_SRC_DIR) $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured: $(LIBSSH2_SRC_PATH)/source-extracted mkdir -p $(dir $@) cd $(dir $@) && \ - $(CMAKE) $(dir $<) $(LIBSSH2_OPTS) + $(CMAKE) $(CMAKE_GENERATOR_COMMAND) $(dir $<) $(LIBSSH2_OPTS) echo 1 > $@ $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-compiled: $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-configured diff --git a/deps/libuv.mk b/deps/libuv.mk index eacabac55e34f..993aa4fc144da 100644 --- a/deps/libuv.mk +++ b/deps/libuv.mk @@ -4,7 +4,7 @@ LIBUV_GIT_URL:=https://github.com/JuliaLang/libuv.git LIBUV_TAR_URL=https://api.github.com/repos/JuliaLang/libuv/tarball/$1 $(eval $(call git-external,libuv,LIBUV,configure,,$(SRCCACHE))) -UV_CFLAGS := -O2 +UV_CFLAGS := -O2 -DBUILDING_UV_SHARED=1 UV_FLAGS := LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v" UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS) $(SANITIZE_OPTS)" diff --git a/deps/llvm.mk b/deps/llvm.mk index 09dd4f187d611..8b823b8664bf2 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -7,6 +7,14 @@ ifneq ($(USE_BINARYBUILDER_LLVM), 1) LLVM_GIT_URL:=https://github.com/JuliaLang/llvm-project.git LLVM_TAR_URL=https://api.github.com/repos/JuliaLang/llvm-project/tarball/$1 $(eval $(call git-external,llvm,LLVM,CMakeLists.txt,,$(SRCCACHE))) +# LLVM's tarball contains symlinks to non-existent targets. This breaks the +# the default msys strategy `deepcopy` symlink strategy. To workaround this, +# switch to `native` which tries native windows symlinks (possible if the +# machine is in developer mode) - or if not, falls back to cygwin-style +# symlinks. We don't particularly care either way - we just need to symlinks +# to succeed. We could guard this by a uname check, but it's harmless elsewhere, +# so let's not incur the additional overhead. +$(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted: $(MSYS_NONEXISTENT_SYMLINK_TARGET_FIX) LLVM_BUILDDIR := $(BUILDDIR)/$(LLVM_SRC_DIR) LLVM_BUILDDIR_withtype := $(LLVM_BUILDDIR)/build_$(LLVM_BUILDTYPE) diff --git a/deps/openssl.mk b/deps/openssl.mk index 705303432c2c6..734ddb3274e78 100644 --- a/deps/openssl.mk +++ b/deps/openssl.mk @@ -59,7 +59,7 @@ $(BUILDDIR)/openssl-$(OPENSSL_VER)/build-configured: $(SRCCACHE)/openssl-$(OPENS mkdir -p $(dir $@) cd $(dir $@) && \ CC="$(CC) $(SANITIZE_OPTS)" CXX="$(CXX) $(SANITIZE_OPTS)" LDFLAGS="$(LDFLAGS) $(RPATH_ESCAPED_ORIGIN) $(SANITIZE_LDFLAGS)" \ - $(dir $<)/Configure shared --prefix=$(abspath $(build_prefix)) $(OPENSSL_TARGET) + $(dir $<)/Configure shared --prefix=$(abspath $(build_prefix)) --libdir=$(abspath $(build_libdir)) $(OPENSSL_TARGET) echo 1 > $@ $(BUILDDIR)/openssl-$(OPENSSL_VER)/build-compiled: $(BUILDDIR)/openssl-$(OPENSSL_VER)/build-configured @@ -75,18 +75,16 @@ endif # Override bindir and only install runtime libraries, otherwise they'll go into build_depsbindir. OPENSSL_INSTALL = \ mkdir -p $2$$(build_shlibdir) && \ - $$(MAKE) -C $1 install_dev $$(MAKE_COMMON) bindir=$$(build_shlibdir) $3 DESTDIR="$2" - -OPENSSL_POST_INSTALL := \ - $(WIN_MAKE_HARD_LINK) $(build_bindir)/libcrypto-*.dll $(build_bindir)/libcrypto.dll && \ - $(WIN_MAKE_HARD_LINK) $(build_bindir)/libssl-*.dll $(build_bindir)/libssl.dll && \ - $(INSTALL_NAME_CMD)libcrypto.$(SHLIB_EXT) $(build_shlibdir)/libcrypto.$(SHLIB_EXT) && \ - $(INSTALL_NAME_CMD)libssl.$(SHLIB_EXT) $(build_shlibdir)/libssl.$(SHLIB_EXT) && \ - $(INSTALL_NAME_CHANGE_CMD) $(build_shlibdir)/libcrypto.3.dylib @rpath/libcrypto.$(SHLIB_EXT) $(build_shlibdir)/libssl.$(SHLIB_EXT) + $$(MAKE) -C $1 install_runtime_libs $$(MAKE_COMMON) bindir=$$(build_shlibdir) $3 DESTDIR="$2" $(eval $(call staged-install, \ openssl,openssl-$(OPENSSL_VER), \ - OPENSSL_INSTALL,,,$(OPENSSL_POST_INSTALL))) + OPENSSL_INSTALL,,, \ + $$(WIN_MAKE_HARD_LINK) $(build_bindir)/libcrypto-*.dll $(build_bindir)/libcrypto.dll && \ + $$(WIN_MAKE_HARD_LINK) $(build_bindir)/libssl-*.dll $(build_bindir)/libssl.dll && \ + $$(INSTALL_NAME_CMD)libcrypto.$$(SHLIB_EXT) $$(build_shlibdir)/libcrypto.$$(SHLIB_EXT) && \ + $$(INSTALL_NAME_CMD)libssl.$$(SHLIB_EXT) $$(build_shlibdir)/libssl.$$(SHLIB_EXT) && \ + $$(INSTALL_NAME_CHANGE_CMD) $$(build_shlibdir)/libcrypto.3.dylib @rpath/libcrypto.$$(SHLIB_EXT) $$(build_shlibdir)/libssl.$$(SHLIB_EXT))) clean-openssl: -rm -f $(BUILDDIR)/-openssl-$(OPENSSL_VER)/build-configured $(BUILDDIR)/-openssl-$(OPENSSL_VER)/build-compiled diff --git a/deps/tools/common.mk b/deps/tools/common.mk index 01b57316f9d1a..212b576fb63f9 100644 --- a/deps/tools/common.mk +++ b/deps/tools/common.mk @@ -59,7 +59,6 @@ CMAKE_COMMON += -DCMAKE_SYSTEM_NAME=Windows CMAKE_COMMON += -DCMAKE_RC_COMPILER="$$(which $(CROSS_COMPILE)windres)" endif -# For now this is LLVM specific, but I expect it won't be in the future ifeq ($(CMAKE_GENERATOR),Ninja) CMAKE_GENERATOR_COMMAND := -G Ninja else ifeq ($(CMAKE_GENERATOR),make) @@ -68,6 +67,27 @@ else $(error Unknown CMake generator '$(CMAKE_GENERATOR)'. Options are 'Ninja' and 'make') endif +ifneq (,$(findstring MINGW,$(RAW_BUILD_OS))) +ifneq (,$(shell ldd $(shell which cmake) | grep msys-2.0.dll)) +# Detect MSYS2 with cygwin CMake rather than MinGW cmake - the former fails to +# properly drive MinGW tools +override CMAKE := echo "ERROR: CMake is Cygwin CMake, not MinGW CMake. Build will fail. Use 'pacman -S mingw-w64-{i686,x86_64}-cmake'."; exit 1; $(CMAKE) +endif +# In our setup, CMAKE_INSTALL_PREFIX is a relative path inside usr-staging. +# We do not want this converted to a windows path, because our make system +# assumes it to be relative to msys `/`. +override CMAKE := MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" $(CMAKE) +endif + +# Some dependencies' tarballs contains symlinks to non-existent targets. This breaks the +# the default msys strategy `deepcopy` symlink strategy. To workaround this, +# switch to `native` which tries native windows symlinks (possible if the +# machine is in developer mode) - or if not, falls back to cygwin-style +# symlinks. We don't particularly care either way - we just need to symlinks +# to succeed. We could guard this by a uname check, but it's harmless elsewhere, +# so let's not incur the additional overhead. +MSYS_NONEXISTENT_SYMLINK_TARGET_FIX := export MSYS=winsymlinks:native + # If the top-level Makefile is called with environment variables, # they will override the values passed above to ./configure MAKE_COMMON := DESTDIR="" prefix=$(build_prefix) bindir=$(build_depsbindir) libdir=$(build_libdir) shlibdir=$(build_shlibdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir) O= @@ -144,7 +164,7 @@ upper = $(shell echo $1 | tr a-z A-Z) # this rule ensures that make install is more nearly atomic # so it's harder to get half-installed (or half-reinstalled) dependencies # # and enables sharing deps compiles, uninstall, and fast reinstall -MAKE_INSTALL = +$$(MAKE) -C $1 install $$(MAKE_COMMON) $3 DESTDIR="$2" +MAKE_INSTALL = MSYS2_ARG_CONV_EXCL="prefix=" $$(MAKE) -C $1 install $$(MAKE_COMMON) $3 DESTDIR="$2" define SHLIBFILE_INSTALL mkdir -p $2/$$(build_shlibdir) diff --git a/src/Makefile b/src/Makefile index e859acc765354..6245139592db1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -75,7 +75,7 @@ GC_CODEGEN_SRCS += llvm-late-gc-lowering-stock endif CODEGEN_SRCS := codegen jitlayers aotcompile debuginfo disasm llvm-simdloop \ llvm-pass-helpers llvm-ptls \ - llvm-lower-handlers llvm-propagate-addrspaces null_sysimage \ + llvm-lower-handlers llvm-propagate-addrspaces \ llvm-multiversioning llvm-alloc-opt llvm-alloc-helpers cgmemmgr llvm-remove-addrspaces \ llvm-remove-ni llvm-julia-licm llvm-demote-float16 llvm-cpufeatures pipeline llvm_api \ $(GC_CODEGEN_SRCS) @@ -192,7 +192,9 @@ endif COMMON_LIBPATHS := -L$(build_libdir) -L$(build_shlibdir) RT_LIBS := $(WHOLE_ARCHIVE) $(LIBUV) $(WHOLE_ARCHIVE) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LIBUNWIND) $(RT_LLVMLINK) $(OSLIBS) $(LIBTRACYCLIENT) $(LIBITTAPI) $(MMTK_LIB) +# NB: CG needs uv_mutex_* symbols, but we expect to export them from libjulia-internal CG_LIBS := $(LIBUNWIND) $(CG_LLVMLINK) $(OSLIBS) $(LIBTRACYCLIENT) $(LIBITTAPI) $(MMTK_LIB) + RT_DEBUG_LIBS := $(COMMON_LIBPATHS) $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a -ljulia-debug $(RT_LIBS) CG_DEBUG_LIBS := $(COMMON_LIBPATHS) $(CG_LIBS) -ljulia-debug -ljulia-internal-debug RT_RELEASE_LIBS := $(COMMON_LIBPATHS) $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport.a -ljulia $(RT_LIBS) @@ -469,10 +471,10 @@ libjulia-codegen-debug: $(build_shlibdir)/libjulia-codegen-debug.$(JL_MAJOR_MINO libjulia-codegen-debug libjulia-codegen-release: $(PUBLIC_HEADER_TARGETS) # set the exports for the source files based on where they are getting linked -$(OBJS): SHIPFLAGS += -DJL_LIBRARY_EXPORTS_INTERNAL -$(DOBJS): DEBUGFLAGS += -DJL_LIBRARY_EXPORTS_INTERNAL -$(CODEGEN_OBJS): SHIPFLAGS += -DJL_LIBRARY_EXPORTS_CODEGEN -$(CODEGEN_DOBJS): DEBUGFLAGS += -DJL_LIBRARY_EXPORTS_CODEGEN +$(OBJS): SHIPFLAGS += -DJL_LIBRARY_EXPORTS_INTERNAL -DBUILDING_UV_SHARED +$(DOBJS): DEBUGFLAGS += -DJL_LIBRARY_EXPORTS_INTERNAL -DBUILDING_UV_SHARED +$(CODEGEN_OBJS): SHIPFLAGS += -DJL_LIBRARY_EXPORTS_CODEGEN -DUSING_UV_SHARED +$(CODEGEN_DOBJS): DEBUGFLAGS += -DJL_LIBRARY_EXPORTS_CODEGEN -DUSING_UV_SHARED clean: -rm -fr $(build_shlibdir)/libjulia-internal* $(build_shlibdir)/libjulia-codegen* $(build_shlibdir)/libccalltest* $(build_shlibdir)/libllvmcalltest* diff --git a/src/flisp/Makefile b/src/flisp/Makefile index eca1de86e588a..2e902a31dbeed 100644 --- a/src/flisp/Makefile +++ b/src/flisp/Makefile @@ -117,7 +117,7 @@ $(BUILDDIR)/host/Makefile: @printf "%s\n" 'include $(SRCDIR)/Makefile' >> $@ $(BUILDDIR)/host/$(EXENAME): $(BUILDDIR)/host/Makefile | ${BUILDDIR}/host/flisp.boot - make -C $(BUILDDIR)/host $(EXENAME) + $(MAKE) -C $(BUILDDIR)/host $(EXENAME) $(BUILDDIR)/host/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)/host/Makefile From f090da83e58abda3d443bb809f78892f7f12f06c Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 29 Nov 2025 22:24:24 -0500 Subject: [PATCH 14/17] doc: NEWS: single method for multiple functions (#59539) --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index cc3a766305841..dde9bf253a070 100644 --- a/NEWS.md +++ b/NEWS.md @@ -29,6 +29,7 @@ New language features * `Threads.@spawn` now takes a `:samepool` argument to specify the same threadpool as the caller. `Threads.@spawn :samepool foo()` which is shorthand for `Threads.@spawn Threads.threadpool() foo()` ([#57109]). * The `@ccall` macro can now take a `gc_safe` argument, that if set to true allows the runtime to run garbage collection concurrently to the `ccall` ([#49933]). +* A single method covering multiple functions is now allowed in more cases. See issue #54620. ([#58131]). Language changes ---------------- @@ -291,3 +292,4 @@ Tooling Improvements [#57109]: https://github.com/JuliaLang/julia/issues/57109 [#57253]: https://github.com/JuliaLang/julia/issues/57253 [#57727]: https://github.com/JuliaLang/julia/issues/57727 +[#58131]: https://github.com/JuliaLang/julia/issues/58131 From a4d42c9fdd7ddef138c0b0005bd2a130ec2ec428 Mon Sep 17 00:00:00 2001 From: Laine Taffin Altman Date: Wed, 14 May 2025 09:53:37 -0700 Subject: [PATCH 15/17] Add JuliaLang/JuliaSyntax.jl#525 to NEWS.md, flisp parser, and REPL (#57143) Now that JuliaLang/JuliaSyntax.jl#525 has been merged, also add it to the flisp parser and REPL, and document it! --- NEWS.md | 5 +++++ src/flisp/julia_extensions.c | 7 ++++++- src/julia-parser.scm | 2 +- stdlib/REPL/src/latex_symbols.jl | 1 + test/syntax.jl | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index dde9bf253a070..f5f68e508bdd9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -30,6 +30,9 @@ New language features `Threads.@spawn :samepool foo()` which is shorthand for `Threads.@spawn Threads.threadpool() foo()` ([#57109]). * The `@ccall` macro can now take a `gc_safe` argument, that if set to true allows the runtime to run garbage collection concurrently to the `ccall` ([#49933]). * A single method covering multiple functions is now allowed in more cases. See issue #54620. ([#58131]). +* The character U+1F8B2 🢲 (RIGHTWARDS ARROW WITH LOWER HOOK), newly added by Unicode 16, + is now a valid operator with arrow precedence, accessible as `\hookunderrightarrow` at the REPL. + ([JuliaLang/JuliaSyntax.jl#525], [#57143]). Language changes ---------------- @@ -290,6 +293,8 @@ Tooling Improvements [#57081]: https://github.com/JuliaLang/julia/issues/57081 [#57087]: https://github.com/JuliaLang/julia/issues/57087 [#57109]: https://github.com/JuliaLang/julia/issues/57109 +[#57143]: https://github.com/JuliaLang/julia/issues/57143 [#57253]: https://github.com/JuliaLang/julia/issues/57253 [#57727]: https://github.com/JuliaLang/julia/issues/57727 [#58131]: https://github.com/JuliaLang/julia/issues/58131 +[JuliaLang/JuliaSyntax.jl#525]: https://github.com/JuliaLang/JuliaSyntax.jl/pull/525 diff --git a/src/flisp/julia_extensions.c b/src/flisp/julia_extensions.c index 07d074e1fb80b..c39c2edfe0f37 100644 --- a/src/flisp/julia_extensions.c +++ b/src/flisp/julia_extensions.c @@ -130,6 +130,9 @@ JL_DLLEXPORT int jl_id_start_char(uint32_t wc) return 1; if (wc < 0xA1 || wc > 0x10ffff) return 0; + // "Rightwards Arrow with Lower Hook" + if (wc == 0x1f8b2) + return 1; return is_wc_cat_id_start(wc, utf8proc_category((utf8proc_int32_t) wc)); } @@ -147,7 +150,9 @@ JL_DLLEXPORT int jl_id_char(uint32_t wc) cat == UTF8PROC_CATEGORY_SK || cat == UTF8PROC_CATEGORY_ME || cat == UTF8PROC_CATEGORY_NO || // primes (single, double, triple, their reverses, and quadruple) - (wc >= 0x2032 && wc <= 0x2037) || (wc == 0x2057)) + (wc >= 0x2032 && wc <= 0x2037) || (wc == 0x2057) || + // "Rightwards Arrow with Lower Hook" + wc == 0x1f8b2) return 1; return 0; } diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 4415dc8686065..1a11494b5c8e3 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -10,7 +10,7 @@ ;; comma - higher than assignment outside parentheses, lower when inside (define prec-pair (add-dots '(=>))) (define prec-conditional '(?)) -(define prec-arrow (add-dots '(← → ↔ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↤ ↮ ⇎ ⇍ ⇏ ⇐ ⇒ ⇔ ⇴ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⟵ ⟶ ⟷ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿ ⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤌ ⤍ ⤎ ⤏ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⤝ ⤞ ⤟ ⤠ ⥄ ⥅ ⥆ ⥇ ⥈ ⥊ ⥋ ⥎ ⥐ ⥒ ⥓ ⥖ ⥗ ⥚ ⥛ ⥞ ⥟ ⥢ ⥤ ⥦ ⥧ ⥨ ⥩ ⥪ ⥫ ⥬ ⥭ ⥰ ⧴ ⬱ ⬰ ⬲ ⬳ ⬴ ⬵ ⬶ ⬷ ⬸ ⬹ ⬺ ⬻ ⬼ ⬽ ⬾ ⬿ ⭀ ⭁ ⭂ ⭃ ⥷ ⭄ ⥺ ⭇ ⭈ ⭉ ⭊ ⭋ ⭌ ← → ⇜ ⇝ ↜ ↝ ↩ ↪ ↫ ↬ ↼ ↽ ⇀ ⇁ ⇄ ⇆ ⇇ ⇉ ⇋ ⇌ ⇚ ⇛ ⇠ ⇢ ↷ ↶ ↺ ↻ --> <-- <-->))) +(define prec-arrow (add-dots '(← → ↔ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↤ ↮ ⇎ ⇍ ⇏ ⇐ ⇒ ⇔ ⇴ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⟵ ⟶ ⟷ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿ ⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤌ ⤍ ⤎ ⤏ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⤝ ⤞ ⤟ ⤠ ⥄ ⥅ ⥆ ⥇ ⥈ ⥊ ⥋ ⥎ ⥐ ⥒ ⥓ ⥖ ⥗ ⥚ ⥛ ⥞ ⥟ ⥢ ⥤ ⥦ ⥧ ⥨ ⥩ ⥪ ⥫ ⥬ ⥭ ⥰ ⧴ ⬱ ⬰ ⬲ ⬳ ⬴ ⬵ ⬶ ⬷ ⬸ ⬹ ⬺ ⬻ ⬼ ⬽ ⬾ ⬿ ⭀ ⭁ ⭂ ⭃ ⥷ ⭄ ⥺ ⭇ ⭈ ⭉ ⭊ ⭋ ⭌ ← → ⇜ ⇝ ↜ ↝ ↩ ↪ ↫ ↬ ↼ ↽ ⇀ ⇁ ⇄ ⇆ ⇇ ⇉ ⇋ ⇌ ⇚ ⇛ ⇠ ⇢ ↷ ↶ ↺ ↻ --> <-- <--> 🢲))) (define prec-lazy-or (add-dots '(|\|\||))) (define prec-lazy-and (add-dots '(&&))) (define prec-comparison diff --git a/stdlib/REPL/src/latex_symbols.jl b/stdlib/REPL/src/latex_symbols.jl index 9f5b7e3e864ed..b739accc72499 100644 --- a/stdlib/REPL/src/latex_symbols.jl +++ b/stdlib/REPL/src/latex_symbols.jl @@ -517,6 +517,7 @@ const latex_symbols = Dict( "\\mapsto" => "↦", "\\hookleftarrow" => "↩", "\\hookrightarrow" => "↪", + "\\hookunderrightarrow" => "🢲", "\\looparrowleft" => "↫", "\\looparrowright" => "↬", "\\leftrightsquigarrow" => "↭", diff --git a/test/syntax.jl b/test/syntax.jl index 833ecf232ed44..70640e6c93d67 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2282,6 +2282,11 @@ end @test Meta.parse("a ⥷ b") == Expr(:call, :⥷, :a, :b) end +# issue 57143 +@testset "binary 🢲" begin + @test Meta.parse("a 🢲 b") == Expr(:call, :🢲, :a, :b) +end + # only allow certain characters after interpolated vars (#25231) @test_parseerror("\"\$x෴ \"", "interpolated variable \$x ends with invalid character \"෴\"; use \"\$(x)\" instead.") From da44f47f1527bc29738c216572d78f6ddaaa02fe Mon Sep 17 00:00:00 2001 From: Miles Cranmer Date: Fri, 3 Oct 2025 20:58:02 -0400 Subject: [PATCH 16/17] Set array size only after allocating the new memory portion (#58848) The `.size` of an array might be getting set too early; before the memory is actually allocated, resulting in larger race windows for inconsistencies (in particular, during finalizers on this thread) to manifest. This helps keep those instructions more nearly consecutive to each other so there is a smaller window for races to be visible, in typical non-adversarial situations. --- base/array.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/base/array.jl b/base/array.jl index 7fe5ff626f448..665934b8a3a11 100644 --- a/base/array.jl +++ b/base/array.jl @@ -1076,10 +1076,10 @@ function _growbeg!(a::Vector, delta::Integer) len = length(a) offset = memoryrefoffset(ref) newlen = len + delta - setfield!(a, :size, (newlen,)) # if offset is far enough advanced to fit data in existing memory without copying if delta <= offset - 1 setfield!(a, :ref, @inbounds memoryref(ref, 1 - delta)) + setfield!(a, :size, (newlen,)) else @noinline (function() @_terminates_locally_meta @@ -1111,6 +1111,7 @@ function _growbeg!(a::Vector, delta::Integer) end setfield!(a, :ref, @inbounds memoryref(newmem, newoffset)) end)() + setfield!(a, :size, (newlen,)) end return end @@ -1125,7 +1126,6 @@ function _growend!(a::Vector, delta::Integer) len = length(a) newlen = len + delta offset = memoryrefoffset(ref) - setfield!(a, :size, (newlen,)) newmemlen = offset + newlen - 1 if memlen < newmemlen @noinline (function() @@ -1156,6 +1156,7 @@ function _growend!(a::Vector, delta::Integer) setfield!(a, :ref, newref) end)() end + setfield!(a, :size, (newlen,)) return end @@ -1173,7 +1174,6 @@ function _growat!(a::Vector, i::Integer, delta::Integer) memlen = length(mem) newlen = len + delta offset = memoryrefoffset(ref) - setfield!(a, :size, (newlen,)) newmemlen = offset + newlen - 1 # which side would we rather grow into? @@ -1183,11 +1183,13 @@ function _growat!(a::Vector, i::Integer, delta::Integer) newref = @inbounds memoryref(mem, offset - delta) unsafe_copyto!(newref, ref, i) setfield!(a, :ref, newref) + setfield!(a, :size, (newlen,)) for j in i:i+delta-1 @inbounds _unsetindex!(a, j) end elseif !prefer_start && memlen >= newmemlen unsafe_copyto!(mem, offset - 1 + delta + i, mem, offset - 1 + i, len - i + 1) + setfield!(a, :size, (newlen,)) for j in i:i+delta-1 @inbounds _unsetindex!(a, j) end @@ -1201,6 +1203,7 @@ function _growat!(a::Vector, i::Integer, delta::Integer) unsafe_copyto!(newref, ref, i-1) unsafe_copyto!(newmem, newoffset + delta + i - 1, mem, offset + i - 1, len - i + 1) setfield!(a, :ref, newref) + setfield!(a, :size, (newlen,)) end end @@ -1213,11 +1216,11 @@ function _deletebeg!(a::Vector, delta::Integer) @inbounds _unsetindex!(a, i) end newlen = len - delta + setfield!(a, :size, (newlen,)) if newlen != 0 # if newlen==0 we could accidentally index past the memory newref = @inbounds memoryref(a.ref, delta + 1) setfield!(a, :ref, newref) end - setfield!(a, :size, (newlen,)) return end function _deleteend!(a::Vector, delta::Integer) From 7c7d8d67d3b9e425ed61f24a6d25eec547e573d5 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sat, 8 Nov 2025 10:52:21 +0100 Subject: [PATCH 17/17] Avoid hardcoding paths in Profile and Sys (#59998) Current code fails when using custom paths. Save directory where Julia source is stored during build in `SOURCEDIR` instead of assuming it can be computed from `BINDIR` (new name chosen to avoid confusing with `build_dir` which is different). Use `DATAROOTDIR` and `DATAROOT` instead of hardcoding `usr/share/` and `share/`. Fix/continuation of #56601, #56627. --- base/Makefile | 1 + base/initdefs.jl | 2 +- base/methodshow.jl | 2 +- base/sysinfo.jl | 8 +++----- doc/make.jl | 2 +- doc/src/devdocs/EscapeAnalysis.md | 2 +- stdlib/CRC32c/test/runtests.jl | 2 +- stdlib/Dates/test/io.jl | 2 +- stdlib/LibGit2/test/libgit2-tests.jl | 2 +- stdlib/Profile/src/Profile.jl | 17 ++++++++--------- stdlib/REPL/src/precompile.jl | 2 +- stdlib/REPL/test/bad_history_startup.jl | 2 +- stdlib/REPL/test/precompilation.jl | 2 +- stdlib/REPL/test/repl.jl | 2 +- stdlib/Random/test/runtests.jl | 2 +- stdlib/SharedArrays/test/runtests.jl | 2 +- test/secretbuffer.jl | 2 +- 17 files changed, 26 insertions(+), 28 deletions(-) diff --git a/base/Makefile b/base/Makefile index f748295c2e6fc..eb36d6d0a4319 100644 --- a/base/Makefile +++ b/base/Makefile @@ -71,6 +71,7 @@ endif @printf "%s\n" "const PRIVATE_LIBDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libdir_rel)))) >> $@ @printf "%s\n" "const PRIVATE_LIBEXECDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libexecdir_rel)))) >> $@ @printf "%s\n" "const INCLUDEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(includedir_rel)))) >> $@ + @printf "%s\n" "const SOURCEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(shell echo $(call cygpath_w,$(JULIAHOME)))))) >> $@ ifeq ($(DARWIN_FRAMEWORK), 1) @printf "%s\n" "const DARWIN_FRAMEWORK = true" >> $@ @printf "%s\n" "const DARWIN_FRAMEWORK_NAME = \"$(FRAMEWORK_NAME)\"" >> $@ diff --git a/base/initdefs.jl b/base/initdefs.jl index afe7578036baa..03c7f14cfa531 100644 --- a/base/initdefs.jl +++ b/base/initdefs.jl @@ -97,7 +97,7 @@ const DEPOT_PATH = String[] function append_bundled_depot_path!(DEPOT_PATH) path = abspath(Sys.BINDIR, "..", "local", "share", "julia") path in DEPOT_PATH || push!(DEPOT_PATH, path) - path = abspath(Sys.BINDIR, "..", "share", "julia") + path = abspath(Sys.BINDIR, Base.DATAROOTDIR, "julia") path in DEPOT_PATH || push!(DEPOT_PATH, path) return DEPOT_PATH end diff --git a/base/methodshow.jl b/base/methodshow.jl index cae0e9d809225..bd0355735f4fd 100644 --- a/base/methodshow.jl +++ b/base/methodshow.jl @@ -140,7 +140,7 @@ function fixup_stdlib_path(path::String) if isdefined(@__MODULE__, :Core) && isdefined(Core, :Compiler) compiler_folder = dirname(String(Base.moduleloc(Core.Compiler).file)) if dirname(path) == compiler_folder - return abspath(Sys.STDLIB, "..", "..", "Compiler", "src", basename(path)) + return abspath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "Compiler", "src", basename(path)) end end end diff --git a/base/sysinfo.jl b/base/sysinfo.jl index f84b00ca324c6..56a3681ae35f7 100644 --- a/base/sysinfo.jl +++ b/base/sysinfo.jl @@ -40,7 +40,7 @@ export BINDIR, which, detectwsl -import ..Base: show +import ..Base: DATAROOTDIR, show """ Sys.BINDIR::String @@ -54,12 +54,10 @@ global BINDIR::String = ccall(:jl_get_julia_bindir, Any, ())::String A string containing the full path to the directory containing the `stdlib` packages. """ -global STDLIB::String = "$BINDIR/../share/julia/stdlib/v$(VERSION.major).$(VERSION.minor)" # for bootstrap +global STDLIB::String = "$BINDIR/$DATAROOTDIR/julia/stdlib/v$(VERSION.major).$(VERSION.minor)" # for bootstrap # In case STDLIB change after julia is built, the variable below can be used # to update cached method locations to updated ones. const BUILD_STDLIB_PATH = STDLIB -# Similarly, this is the root of the julia repo directory that julia was built from -const BUILD_ROOT_PATH = "$BINDIR/../.." # helper to avoid triggering precompile warnings @@ -178,7 +176,7 @@ end function __init_build() global BINDIR = ccall(:jl_get_julia_bindir, Any, ())::String vers = "v$(string(VERSION.major)).$(string(VERSION.minor))" - global STDLIB = abspath(BINDIR, "..", "share", "julia", "stdlib", vers) + global STDLIB = abspath(BINDIR, DATAROOTDIR, "julia", "stdlib", vers) nothing end diff --git a/doc/make.jl b/doc/make.jl index dd847b834aa8e..193b49097778b 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -4,7 +4,7 @@ empty!(LOAD_PATH) push!(LOAD_PATH, @__DIR__, "@stdlib") empty!(DEPOT_PATH) push!(DEPOT_PATH, joinpath(@__DIR__, "deps")) -push!(DEPOT_PATH, abspath(Sys.BINDIR, "..", "share", "julia")) +push!(DEPOT_PATH, abspath(Sys.BINDIR, Base.DATAROOTDIR, "julia")) using Pkg Pkg.instantiate() diff --git a/doc/src/devdocs/EscapeAnalysis.md b/doc/src/devdocs/EscapeAnalysis.md index d8efd759fa131..9c568541ab7c0 100644 --- a/doc/src/devdocs/EscapeAnalysis.md +++ b/doc/src/devdocs/EscapeAnalysis.md @@ -22,7 +22,7 @@ defines the convenience entries `code_escapes` and `@code_escapes` for testing a ```@repl EAUtils # InteractiveUtils.@activate Compiler # to use the stdlib version of the Compiler -let JULIA_DIR = normpath(Sys.BINDIR, "..", "share", "julia") +let JULIA_DIR = normpath(Sys.BINDIR, Base.DATAROOTDIR, "julia") include(normpath(JULIA_DIR, "Compiler", "test", "EAUtils.jl")) using .EAUtils end diff --git a/stdlib/CRC32c/test/runtests.jl b/stdlib/CRC32c/test/runtests.jl index 37b447e6d999a..f4097a919c7bb 100644 --- a/stdlib/CRC32c/test/runtests.jl +++ b/stdlib/CRC32c/test/runtests.jl @@ -3,7 +3,7 @@ using Test, Random using CRC32c -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl")) using .Main.OffsetArrays: Origin diff --git a/stdlib/Dates/test/io.jl b/stdlib/Dates/test/io.jl index 98bc610784477..8159b33574bd5 100644 --- a/stdlib/Dates/test/io.jl +++ b/stdlib/Dates/test/io.jl @@ -5,7 +5,7 @@ module IOTests using Test using Dates -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") include(joinpath(BASE_TEST_PATH, "testhelpers", "withlocales.jl")) @testset "string/show representation of Date" begin diff --git a/stdlib/LibGit2/test/libgit2-tests.jl b/stdlib/LibGit2/test/libgit2-tests.jl index b186f67c65cf1..bc347bb5129dc 100644 --- a/stdlib/LibGit2/test/libgit2-tests.jl +++ b/stdlib/LibGit2/test/libgit2-tests.jl @@ -7,7 +7,7 @@ using LibGit2_jll using Test using Random, Serialization, Sockets -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :ChallengePrompts) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ChallengePrompts.jl")) using .Main.ChallengePrompts: challenge_prompt as basic_challenge_prompt diff --git a/stdlib/Profile/src/Profile.jl b/stdlib/Profile/src/Profile.jl index 27f32fc453d55..ab8458539b2c4 100644 --- a/stdlib/Profile/src/Profile.jl +++ b/stdlib/Profile/src/Profile.jl @@ -538,8 +538,7 @@ function flatten(data::Vector, lidict::LineInfoDict) return (newdata, newdict) end -const SRC_DIR = normpath(joinpath(Sys.BUILD_ROOT_PATH, "src")) -const COMPILER_DIR = "../usr/share/julia/Compiler/" +const SRC_DIR = normpath(Base.SOURCEDIR, "src") # Take a file-system path and try to form a concise representation of it # based on the package ecosystem @@ -548,17 +547,18 @@ function short_path(spath::Symbol, filenamecache::Dict{Symbol, Tuple{String,Stri return get!(filenamecache, spath) do path = Base.fixup_stdlib_path(string(spath)) path_norm = normpath(path) - possible_base_path = normpath(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "base", path)) + possible_base_path = normpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "base", path) lib_dir = abspath(Sys.BINDIR, Base.LIBDIR) + compiler_dir = normpath(Base.DATAROOT, "julia", "Compiler/") if startswith(path_norm, SRC_DIR) remainder = only(split(path_norm, SRC_DIR, keepempty=false)) return (isfile(path_norm) ? path_norm : ""), "@juliasrc", remainder elseif startswith(path_norm, lib_dir) remainder = only(split(path_norm, lib_dir, keepempty=false)) return (isfile(path_norm) ? path_norm : ""), "@julialib", remainder - elseif contains(path, COMPILER_DIR) - remainder = split(path, COMPILER_DIR, keepempty=false)[end] - possible_compiler_path = normpath(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "Compiler", remainder)) + elseif startswith(path_norm, compiler_dir) + remainder = split(path_norm, compiler_dir, keepempty=false)[end] + possible_compiler_path = normpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "Compiler", remainder) return (isfile(possible_compiler_path) ? possible_compiler_path : ""), "@Compiler", remainder elseif isabspath(path) if ispath(path) @@ -586,11 +586,10 @@ function short_path(spath::Symbol, filenamecache::Dict{Symbol, Tuple{String,Stri elseif isfile(possible_base_path) # do the same mechanic for Base (or Core/Compiler) files as above, # but they start from a relative path - return possible_base_path, "@Base", normpath(path) + return possible_base_path, "@Base", path_norm else # for non-existent relative paths (such as "REPL[1]"), just consider simplifying them - path = normpath(path) - return "", "", path # drop leading "./" + return "", "", path_norm # drop leading "./" end end end diff --git a/stdlib/REPL/src/precompile.jl b/stdlib/REPL/src/precompile.jl index c4295934da3a5..a4d289db8cd40 100644 --- a/stdlib/REPL/src/precompile.jl +++ b/stdlib/REPL/src/precompile.jl @@ -7,7 +7,7 @@ import ..REPL # Ugly hack for our cache file to not have a dependency edge on the FakePTYs file. Base._track_dependencies[] = false try - Base.include(@__MODULE__, joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testhelpers", "FakePTYs.jl")) + Base.include(@__MODULE__, joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test", "testhelpers", "FakePTYs.jl")) @Core.latestworld import .FakePTYs: open_fake_pty finally diff --git a/stdlib/REPL/test/bad_history_startup.jl b/stdlib/REPL/test/bad_history_startup.jl index 09f7a00e1c31a..6c342751d9a07 100644 --- a/stdlib/REPL/test/bad_history_startup.jl +++ b/stdlib/REPL/test/bad_history_startup.jl @@ -4,7 +4,7 @@ using Test -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :FakePTYs) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "FakePTYs.jl")) import .Main.FakePTYs: with_fake_pty diff --git a/stdlib/REPL/test/precompilation.jl b/stdlib/REPL/test/precompilation.jl index bc3eda15eae61..57b6b27be6e7c 100644 --- a/stdlib/REPL/test/precompilation.jl +++ b/stdlib/REPL/test/precompilation.jl @@ -2,7 +2,7 @@ ## Tests that compilation in the interactive session startup are as expected using Test -Base.include(@__MODULE__, joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testhelpers", "FakePTYs.jl")) +Base.include(@__MODULE__, joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test", "testhelpers", "FakePTYs.jl")) import .FakePTYs: open_fake_pty if !Sys.iswindows() diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 0ca3788d2b460..09ad35dd4e21e 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -11,7 +11,7 @@ empty!(Base.Experimental._hint_handlers) # unregister error hints so they can be @test Base.REPL_MODULE_REF[] === REPL -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :FakePTYs) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "FakePTYs.jl")) import .Main.FakePTYs: with_fake_pty diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index a28197bdfe833..cfc53a6cd17be 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -3,7 +3,7 @@ using Test, SparseArrays using Test: guardseed -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl")) using .Main.OffsetArrays diff --git a/stdlib/SharedArrays/test/runtests.jl b/stdlib/SharedArrays/test/runtests.jl index 84dffafb3d92a..1d4bd81e4b75f 100644 --- a/stdlib/SharedArrays/test/runtests.jl +++ b/stdlib/SharedArrays/test/runtests.jl @@ -1,7 +1,7 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license using Test, Distributed, SharedArrays, Random -include(joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testenv.jl")) +include(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test", "testenv.jl")) # These processes explicitly want to share memory, we can't have # them in separate rr sessions diff --git a/test/secretbuffer.jl b/test/secretbuffer.jl index 703552570745c..996471c5b3830 100644 --- a/test/secretbuffer.jl +++ b/test/secretbuffer.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test") +const BASE_TEST_PATH = joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia", "test") isdefined(Main, :ChallengePrompts) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ChallengePrompts.jl")) using .Main.ChallengePrompts: challenge_prompt