-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update README for the new UUID & __init__ syntax #55
Conversation
For larger amounts of code you can also use `@require Package include("glue.jl")`. | ||
The code wrapped by `@require` will execute as soon as the given package is loaded | ||
(which may be immediately). | ||
if you wish to exploit precompilation for the new code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So unless you package your glue code in a module it won't be precompiled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. For a small amount of code you probably don't care, but for a lot it might be nice to have precompilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timholy Does MyGluePkg need to be a separate Julia package with a separate repository? Or is there a way for the MyGluePkg code to be stored in the same repo as MyPkg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no official support for that, but MyPkg
could do a push!(LOAD_PATH, @__DIR__)
and make itself its own little package repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be an acceptable approach for package authors to take, or is that considered bad practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any kind of firm opinion on that, sorry.
Thanks for updating the README. What about julia Base packages, such as |
They do, though I'm not sure where to find them officially. They do appear in your |
I'm not sure you need to trigger on them, however, since they are always present. Just make your package dependent on them. |
OK, thanks, yes, that is how it was before. I just thought it'd be cleaner to separate the LinearAlgebra support. |
Thanks a lot @timholy! |
There still seems to be some confusion about how to use this (#46 (comment)), so let's document the new syntax in the README. CC @davidavdav