Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Compat.Sys.BINDIR #433

Merged
merged 3 commits into from
Dec 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,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])

## New macros

* `@__DIR__` has been added ([#18380])
Expand Down Expand Up @@ -392,3 +394,4 @@ includes this fix. Find the minimum version from there.
[#24652]: https://github.com/JuliaLang/julia/issues/24652
[#24657]: https://github.com/JuliaLang/julia/issues/24657
[#24785]: https://github.com/JuliaLang/julia/issues/24785
[#25102]: https://github.com/JuliaLang/julia/issues/25102
4 changes: 4 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ 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
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have an else that uses Sys.BINDIR from Base.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Fixed, and added a test.

end

@static if VERSION < v"0.7.0-DEV.892"
Expand Down