-
-
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
extern keyword (cf conditional modules) #15705
Comments
thought this would have to be an 0.5 target, or am i not remembering the conversation on this right? |
It would be great but someone's got to do the work and I think it's a pretty short list of people who can. |
What about reserving the syntax as a no-op? Or will a macro in Compat be enough to let package authors start trying to use it once it gets implemented without breaking on past Julia versions? |
x-ref relevant discussion on the mailing list https://groups.google.com/d/msg/julia-users/RDTZnVbiBig/NfBTtodUBAAJ, particularly in how this needs to tie into precompilation |
@StefanKarpinski , @vtjnash and I discussed this and decided this is probably more complex and difficult than conditional loading, and perhaps beyond what is really needed. We kicked around the following idea:
|
Multiple modules for packages sounds great! A concern: what happens with optional modules which have their own version requirements? (e.g., if Gadfly/DataFramesBridge requires DataFrames >= v"0.6.0") |
You basically just need to be able to declare what versions of "optional dependencies" each package can work with. In other words, effectively like having |
Would it be an active constraint or a passive one? Would it be allowed to participate in version resolution, or only be allowed to disable the optional component when its bounds aren't met? Would optional dependencies ever depend on multiple packages? Would these internal submodules be able to be nested? |
I don't think we'll need nesting. |
closing this one then as we're back to preferring #6195 |
We should have discussed more publically, some of the back and forth happened in person in Boston and I wasn't there either. I think the basic summary is that this would be harder to get right than the conditional modules version. Modules are the unit of precompilation today, conditional modules would be similar to Requires.jl but implemented in a way that correctly hooked into the precompilation mechanism. Or put another way, it would put some sugar / automation around the current option that already works of moving code that depends on A and B to a separate package C that unconditionally depends on both. Conditional modules would let you put the code for C inside one of A or B and automatically act like a separately precompiled package if the other is present at load time. It would have to correctly track the precompilation state to avoid the errors / missing functionality you get today with the hacky approximations of this, when the packages available at precompilation time differ from what's available at load time. |
Implement the
extern
keyword as discussed here: #6884.The text was updated successfully, but these errors were encountered: