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

Untaken Branch Affects whether package can be loaded #6936

Closed
Keno opened this issue May 23, 2014 · 3 comments
Closed

Untaken Branch Affects whether package can be loaded #6936

Keno opened this issue May 23, 2014 · 3 comments

Comments

@Keno
Copy link
Member

Keno commented May 23, 2014

julia> if isdefined(:Gadfly)
           const g = Gadfly
           for x in (1,)
           end
       end

julia> using Gadfly
ERROR: invalid module path (Gadfly does not name a module)

Without the first expression Gadfly loads just fine.

@JeffBezanson
Copy link
Member

This is basically #2586 --- the for loop forces compilation, which forces the binding for Gadfly to be resolved in const g = Gadfly.

@JeffBezanson JeffBezanson changed the title Untaken Branch Affects whether package is loaded Untaken Branch Affects whether package can be loaded May 23, 2014
@JeffBezanson
Copy link
Member

Hmm, maybe I can fix this since the binding location can stay the same, and allow loading the module as long as the variable remains undefined.

@Keno
Copy link
Member Author

Keno commented May 23, 2014

Awesome!

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

No branches or pull requests

2 participants