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

a new UUID is generated even if there is a Project.toml with an existing one #22

Closed
tpapp opened this issue Oct 3, 2018 · 5 comments · Fixed by #65595
Closed

a new UUID is generated even if there is a Project.toml with an existing one #22

tpapp opened this issue Oct 3, 2018 · 5 comments · Fixed by #65595

Comments

@tpapp
Copy link

tpapp commented Oct 3, 2018

Even if a package has a Project.toml with an uuid field, a new (apparently random, unrelated) one seems to be generated by the pipeline.

It would be nice to just use the existing one.

Cf discussion

@timziebart
Copy link

How is the process here? While certainly not being high-prio, it would be nice if it were solved.

@StefanKarpinski
Copy link
Contributor

There is a solution: if you are registering a package in METADATA, then you should use the utility function Pkg.METADATA_compatible_uuid to generate a UUID for your project, e.g.:

julia> Pkg.METADATA_compatible_uuid("MyPkg")
UUID("793ebe2b-975c-555a-bd0c-65619c3a03ab")

@timziebart
Copy link

Oh, nice, thanks!

@tpapp
Copy link
Author

tpapp commented Jan 18, 2019

I think the issue was closed a bit prematurely, for two reasons:

  1. Pkg.METADATA_compatible_uuid is a workaround, not solution, and then it is not easily discoverable. A user could just set up a Project.toml by just reading the relevant manuals (Julia's docs, Pkg docs, etc) and never learn about it, running into the issue only when registering the package (and then it is pretty insidious, as mismatching UUIDs can give surprising behavior when one is unaware that this is a possibility).

  2. I still don't understand why the registry has to do this. I understand that historically, packages had no UUIDs so one had to be generated, but that is becoming less and less common.

@StefanKarpinski
Copy link
Contributor

The issue is in the wrong place, first off—there's no code here. Once we switch the registration process to registering directly with the General registry then this won't be an issue any more. So the solution to this problem is to implement JuliaLang/Pkg.jl#849.

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 a pull request may close this issue.

3 participants