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

Fails on 1.2-RC2 branch #81

Closed
KristofferC opened this issue Jul 1, 2019 · 4 comments
Closed

Fails on 1.2-RC2 branch #81

KristofferC opened this issue Jul 1, 2019 · 4 comments
Assignees

Comments

@KristofferC
Copy link

Activating environment at `/var/folders/64/76tk_g152sg6c6t0b4nkn1vw0000gn/T/jl_CtFNy2/Project.toml`
[ Info: Committed 6 files/directories: src/, Project.toml, test/, README.md, LICENSE, .gitignore
Package generation: Error During Test at /Users/kristoffer/JuliaPkgEval/PkgTemplates.jl/test/tests.jl:246
  Got exception outside of a @test
  cannot add package `TestPkg = "bf82b64b-6f52-4f8c-9e5f-300aab286c9d"` since package `TestPkg = "818935ba-fd75-46db-9c21-f1179dc136ad"` already exists as a direct dependency.
  Stacktrace:
   [1] pkgerror(::String, ::Vararg{String,N} where N) at /Users/kristoffer/julia/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:112
   [2] assert_can_add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/kristoffer/julia/usr/share/julia/stdlib/v1.2/Pkg/src/Operations.jl:933

New Pkg version detects that you are trying to add a package with the same name but a new UUID to the Project.

@rofinn rofinn self-assigned this Jul 25, 2019
@rofinn
Copy link
Contributor

rofinn commented Jul 26, 2019

AFAICT, this package is just generating a new Project.toml and then deving it. Does Pkg3 keep track of generated packages somehow? Is there a good way to create and destroy package safely? Maybe activating a new environment for each package if the registry is remaining unmodified?

@KristofferC
Copy link
Author

KristofferC commented Jul 26, 2019

It gets saved to the active project when it is devved. And then I guess there is another dev call with the same name of the package but another UUID. One solution is to rm the package between the calls.

@rofinn
Copy link
Contributor

rofinn commented Jul 26, 2019

Hmmm, I did try that, but it didn't seem to work. I'm assuming Pkg.rm is a blocking operation?

@christopher-dG
Copy link
Member

I don't believe that this is an issue with the package code, but rather the test suite/methodology. The tests are being rewritten over in #61 so this should not be an issue going forward.

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

3 participants