Skip to content

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 StefanKarpinski force-pushed the sk/home branch 2 times, most recently from 1927dc4 to d031439 Compare December 16, 2017 18:52
@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.

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.

3 participants