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

Update README for the new UUID & __init__ syntax #55

Merged
merged 2 commits into from
Aug 28, 2018
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 26, 2018

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

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

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?

Copy link
Member Author

@timholy timholy Aug 26, 2018

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.

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

@davidavdav
Copy link

Thanks for updating the README. What about julia Base packages, such as LinearAlgebra, that don't seem to have a UUID?

@timholy
Copy link
Member Author

timholy commented Aug 27, 2018

They do, though I'm not sure where to find them officially. They do appear in your ~/.julia/environments/vX.X/Manifest.toml file.

@timholy
Copy link
Member Author

timholy commented Aug 27, 2018

I'm not sure you need to trigger on them, however, since they are always present. Just make your package dependent on them.

@davidavdav
Copy link

OK, thanks, yes, that is how it was before. I just thought it'd be cleaner to separate the LinearAlgebra support.

@MikeInnes MikeInnes merged commit d33a81b into master Aug 28, 2018
@MikeInnes
Copy link
Collaborator

Thanks a lot @timholy!

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

Successfully merging this pull request may close these issues.

5 participants