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

rename JULIA_HOME => Sys.BINDIR #25102

Merged
merged 3 commits into from
Dec 18, 2017
Merged

rename JULIA_HOME => Sys.BINDIR #25102

merged 3 commits into from
Dec 18, 2017

Conversation

StefanKarpinski
Copy link
Member

No description provided.

@StefanKarpinski StefanKarpinski changed the title rename JULIA_HOME/JULIA_HOME => JULIA_BINDIR/Sys.BINDIR [#20899] rename JULIA_HOME => Sys.BINDIR Dec 16, 2017
ROOT = abspath(JULIA_HOME,"..")
ENV["PATH"]="$JULIA_HOME:$(ENV["PATH"])"
ROOT = abspath(Sys.BINDIR,"..")
ENV["PATH"]="$Sys.BINDIR:$(ENV["PATH"])"
Copy link
Member

Choose a reason for hiding this comment

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

The interpolation here will get Sys but not BINDIR; you'll need to put parentheses around Sys.BINDIR.

@StefanKarpinski
Copy link
Member Author

This is pretty messy. I cannot figure out how to get deprecation from Base into Sys.Base to play nicely with the these changes. So this prints lots of "precompile might be broken" warnings during CI. @vtjnash, any ideas how to do this better? I've tried every combination of eval and placement I can think of.

@StefanKarpinski
Copy link
Member Author

Ok, screw the deprecations on this what – what a mess. The change itself is easy, making the deprecations not barf in all circumstances seems to be impossible, so I'm just not going to bother.

@@ -123,11 +123,10 @@ end
deprecate(m::Module, s::Symbol, flag=1) = ccall(:jl_deprecate_binding, Void, (Any, Any, Cint), m, s, flag)

macro deprecate_binding(old, new, export_old=true, dep_message=nothing)
dep_message == nothing && (dep_message = ", use $new instead")
Copy link
Member

Choose a reason for hiding this comment

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

Ah, the elusive 5 space indent...

@ararslan
Copy link
Member

Seems like you should be able to do the renaming and all of that, then just add a @deprecate_binding? Not sure though.

@StefanKarpinski
Copy link
Member Author

You would think so. But the combination of how this relates to code loading – variable definitions need to happen at a very particular point in the loading process – and the fact that the variable is not just moved inside of Base but moved into another module makes this a nightmare. There may be a way to do it, but I've already wasted enough time on this.

@ararslan
Copy link
Member

LGTM apart from the one 5-space indent. Nice work and thanks for going through it!

@StefanKarpinski
Copy link
Member Author

Why did someone cancel the Circle CI run?

This was the only value exported from Sys with a lowercase name –
all other lowercase exports are functions and values are uppercase.
ENV["JULIA_HOME"] => ENV["JULIA_BINDIR"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants