Skip to content

Commit

Permalink
preload base/userimg.jl if it exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Feb 12, 2014
1 parent bcc16c4 commit 78e34eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/file_constants.jl
/uv_constants.jl
/version_git.jl
/userimg.jl
2 changes: 2 additions & 0 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,5 @@ begin
end

end # baremodule Base

Base.isfile("userimg.jl") && Base.include("userimg.jl")

This comment has been minimized.

Copy link
@Keno

Keno May 19, 2014

Member

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

This comment has been minimized.

Copy link
@Keno

Keno May 19, 2014

Member

@JeffBezanson could you confirm?

5 comments on commit 78e34eb

@timholy
Copy link
Member

Choose a reason for hiding this comment

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

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?

@StefanKarpinski
Copy link
Member Author

Choose a reason for hiding this comment

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

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.

@timholy
Copy link
Member

Choose a reason for hiding this comment

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

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

@staticfloat
Copy link
Member

Choose a reason for hiding this comment

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

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.

@staticfloat
Copy link
Member

Choose a reason for hiding this comment

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

......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.