diff --git a/README.md b/README.md index 1a6108424..c491841e1 100644 --- a/README.md +++ b/README.md @@ -255,6 +255,8 @@ Currently, the `@compat` macro supports the following syntaxes: * `Complex32`, `Complex64`, and `Complex128` are now `ComplexF16`, `ComplexF32`, and `ComplexF64`, respectively ([#24647]). +* `JULIA_HOME` is now `Sys.BINDIR`, available in the `Compat.Sys` submodule. ([#25102]) + * `Associative` is now `AbstractDict` ([#25012]). * `indices` is now `axes` ([#25057]). @@ -416,4 +418,5 @@ includes this fix. Find the minimum version from there. [#25021]: https://github.com/JuliaLang/julia/issues/25021 [#25056]: https://github.com/JuliaLang/julia/issues/25056 [#25057]: https://github.com/JuliaLang/julia/issues/25057 +[#25102]: https://github.com/JuliaLang/julia/issues/25102 [#25162]: https://github.com/JuliaLang/julia/issues/25162 diff --git a/src/Compat.jl b/src/Compat.jl index 7b8533730..118f1864c 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -584,6 +584,12 @@ module Sys else import Base.Sys: isapple, isbsd, islinux, isunix, iswindows end + + @static if VERSION < v"0.7.0-DEV.3073" + const BINDIR = JULIA_HOME + else + const BINDIR = Base.Sys.BINDIR + end end @static if VERSION < v"0.7.0-DEV.892" diff --git a/test/runtests.jl b/test/runtests.jl index c3afca36e..0c96417b3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1015,6 +1015,13 @@ end @test ComplexF32 === Complex{Float32} @test ComplexF64 === Complex{Float64} +# 0.7.0-DEV.3073 +if VERSION < v"0.7.0-DEV.3073" + @test Compat.Sys.BINDIR == JULIA_HOME +else + @test Compat.Sys.BINDIR == Sys.BINDIR +end + # 0.7.0-DEV.2915 module Test25021 using Compat