-
-
Notifications
You must be signed in to change notification settings - Fork 116
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 Base internal function LIBEXECDIR #676
Conversation
Yeah, that's tricky. We obviously don't want to mess with |
Is there a good way to test this? Make sure |
Unfortunately it's really hard to test this since it's an optional build dependency whether 7z.exe exists in that folder. As a result this is actually not even tested in Julia due to these difficulties. |
I think I fixed up all the version logic here which is a bit complex due to all the backports JuliaLang/julia#33125 JuliaLang/julia#33777 (backported to rc-5 JuliaLang/julia#33630) cc @staticfloat |
The assumption is that all commits before JuliaLang/julia#33125 don't have a libexec folder so we emulate it's behavior where the relevant external exe's are located simply in the root julia |
Not sure why this is failing on 1.3, since it works locally |
src/Compat.jl
Outdated
@@ -93,6 +93,19 @@ if VERSION < v"1.4.0-DEV.329" | |||
Base.:∘(f, g, h...) = ∘(f ∘ g, h...) | |||
end | |||
|
|||
# https://github.com/JuliaLang/julia/pull/33777 | |||
if v"1.4.0-DEV.172" <= VERSION < v"1.4.0-DEV.445" | |||
libexecdir = Sys.iswindows() ? "..\\libexec" : "../libexec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libexecdir = Sys.iswindows() ? "..\\libexec" : "../libexec" | |
libexecdir = joinpath("..", "libexec") |
(same below)
The test failure is due to resolving the Line 5 in 0e84461
Probably explicitly using However, there is also this:
You probably have to move the code into |
Great thanks, the problem was with the |
I'm having second thoughts on whether we should include this. It's not apart of the stable API. Including it makes updating some packages easier, but I wonder if it's better to let them just handle it instead of including it as part of Compat. |
# https://github.com/JuliaLang/julia/pull/33777 | ||
if v"1.4.0-DEV.172" <= VERSION < v"1.4.0-DEV.445" | ||
@eval(Base, const LIBEXECDIR = $(joinpath("..", "libexec"))) | ||
elseif v"1.4" <= VERSION < v"1.4.0-DEV.172" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need also find the commit where this was moved, so this is not 100% correct in all cases.
This is being backported to rc5, so I'm not sure if
VERSION < v"1.4.0-DEV.445"
is appropriate?