Permalink
Browse files

preload base/userimg.jl if it exists.

  • Loading branch information...
1 parent bcc16c4 commit 78e34ebb1bf199ef11aa887e111afff685cc0ba0 @StefanKarpinski StefanKarpinski committed Feb 12, 2014
Showing with 3 additions and 0 deletions.
  1. +1 −0 base/.gitignore
  2. +2 −0 base/sysimg.jl
View
@@ -5,3 +5,4 @@
/file_constants.jl
/uv_constants.jl
/version_git.jl
+/userimg.jl
View
@@ -246,3 +246,5 @@ begin
end
end # baremodule Base
+
+Base.isfile("userimg.jl") && Base.include("userimg.jl")
@Keno

Keno May 19, 2014

Owner

I believe this needs to be Core.include to avoid #6657

@Keno

Keno May 19, 2014

Owner

@JeffBezanson could you confirm?

5 comments on commit 78e34eb

Owner

timholy replied Feb 12, 2014

I have a version of this locally too; one thing I've noticed is that (currently at least, and maybe long-term) we would benefit from a make bare to build a version of Julia that doesn't include userimg.jl. This is not something I currently know how to implement, but perhaps it could just temporarily rename userimg.jl and then change it back after the build is done?

Hmm. That's a pretty hacky way to do this. I'm hoping that we can have a better, more general and robust system for preloading things soon. For now I think this will have to do. Was your version significantly different? It was actually rather hard to figure out something here that worked at all. This bootstrapping stuff is so fragile.

Owner

timholy replied Feb 13, 2014

Other than me not realizing that base/ has its own .gitignore, it was identical.

Owner

staticfloat replied May 19, 2014

make bare is easy; just export JULIA_MAKE_BARE=1 in the makefile shell, then inside Julia's sysimg.jl file put get( ENV, "JULIA_MAKE_BARE", "") != "1" or similar in an if statement around these include functions.

Owner

staticfloat replied May 19, 2014

......wow, just realized that this is really old. I guess Keno's comments above tricked my brain into thinking that this was something being actively discussed. Ignore me! :P

Please sign in to comment.