-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Let workspace() call load_juliarc() #12314
Conversation
This should only be done if the init process loads |
@yuyichao I'm not familiar enough with the internals and bootstrapping of a Julia session to understand exactly what you're talking about. Are you saying that this is a bad idea altogether, or just that the load needs to be conditional inside |
I think this is a good idea and I'm saying it should be conditioned. You can do a |
That option looks to be a little confusing. I think 0 is the default (on), 1 is explicitly on, and 2 is explicitly off. src/julia.h:1551 |
Would be nice if the option value defines were more easily accessible to Julia code to make this harder to break if the meaning of the option values ever changes. One way to help with that would to construct a test that ensures this works exactly as intended as part of |
Question: would calling |
We probably need to check the options for whether |
While I wholeheartedly agree that writing tests for this is a Good Thing(TM), actually doing it is a little outside of my depth (and, likely, requires me to invest more time than I have to learn what I need to get it done...) - there are too many moving parts that I know next to nothing about. After all, managing to suggest this change in the first place was mostly due to some luck with search terms :) If someone wants to guide me through the process (and by that I probably mean more or less tell me what code to insert where) I can add tests to this PR. If not, I'm totally fine with this not being merged until someone has the time to write some tests for it. After all, the workaround very simple. |
(For anyone coming here looking for a workaround: I currently have the following in my
|
I think this could be fine to merge now if others agree, my annoyance at hardcoded option enums and lack of testing aren't strong enough to hold up the change. |
Will this be included in 0.5? :) |
I think |
When exploring some possibilities to optimize my workflow (see this thread on julia-users) I ran into problems because
~/.juliarc.jl
wasn't loaded when I ranworkspace()
. This PR mitigates that.If there is a reason not to do this, it's no big deal for me - I can always do
workspace(); Base.load_juliarc()
manually - but I think it feels both intuitive and useful that the startup script is run in every workspace, and not just the first in each session.