-
Notifications
You must be signed in to change notification settings - Fork 4
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
Question #24
Comments
It's because the new Pkg is stingy with names as part of its solution of the "dependency hell" problem: https://julialang.github.io/Pkg.jl/v1/#Background-and-Design-1. You might have a local package named You can fix this by explicitly saying |
If we use Pkg.clone, there would be warning saying "Pkg.clone is only kept for legacy CI script reasons..." using Pkg
Pkg.add(PackageSpec(url="git@github.com:timholy/ImagineFormat.jl.git")) And, adding TestPkg would work well also.
To add 'ImagineFormat' to TestPkg as a dependency, we need to use 'Project.toml' file in TestPkg root directory. (REQUIRE file doesn't work for private repo.) |
Your explanation seems to apply to registered packages, but something extra seems to be going on with unregistered packages. Given your explanation it makes sense that (substitute julia> using ImagineInterface
[ Info: Precompiling ImagineInterface [3fdf7afa-b2e9-5a34-a557-9a56655c4c08]
ERROR: LoadError: ArgumentError: Package ImagineInterface does not have UnitAliases in its dependencies:
- If you have ImagineInterface checked out for development and have
added UnitAliases as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with ImagineInterface
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:830
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1038
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:2
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:399
[8] top-level scope at ./none:3
in expression starting at /home/cody/.julia/dev/ImagineInterface/src/ImagineInterface.jl:5 My case seems to be what Dae Woo is describing here
But for some reason I get an error instead of a warning. Maybe the error changed to a warning in Julia 1.0? The registry approach seems powerful, but it seems to require a lot of copy-paste between various |
How about trying 'Pkg.resolve()' as error message suggested? |
You can use (v1.0) pkg> activate .
(StaticArrays) pkg> add Foo to add dependents to a project (you should be in the top-level directory of the package when you do this). I've noticed some errors, though, when using privately registered packages, so in my function getpkgid(name)
project = Base.active_project()
Base.project_deps_get(project, name)
end and frequently copy/paste the UUIDs in. 😦 On balance the experience with Pkg3 for developers is current less ideal than for users; this is pretty well-known ("package users are living in the promised land, but package developers are still awkwardly straddling the old and new worlds (but not for long)"), though fixing it seems slower than I would have expected. It helps to check out this branch of PkgDev. |
This doesn't change anything :(
Thanks! I had been looking for functions like I think I'm getting a sense of how things work. That branch of PkgDev is also very nice, especially A note and some links to relevant issues to watch (for my own reference, maybe others) |
One more question. Quoting from the README:
Is there any way to relax this requirement so that the registry always uses a certain branch? (like Edit: this discourse post is the best doc I've found: |
And yet another question... I'm trying to add a repo to the registry and getting the "registry dirty" problem that Tim brought up here: How do you usually deal with that? I tried deleting the General registry as suggested here: but this made things more broken: The General registry does not reinstall automatically as suggested in that post. Is this a 0.7 vs 1.0 difference? I am still on 0.7 but starting to wonder whether I should just skip to 1.0. |
I think regular package user can use certain branch by
I think this is the reason we manage versions of a package.
Thanks. This post is quite detail. I'd like to add this link to README.
When we update packages installed, julia update registry first and than resolve specific version of each installed package. I think when julia update registry, it seems they just pull commits from the same branch in repository to the current branch of local registry location. |
Thanks! See also the last few comments here: JuliaLang/Pkg.jl#770. |
I thought I could temporarily work on ImagineInterface.jl without adding it to this registry, but I've noticed that cloning private repos in the build script doesn't work with Julia 0.7+.
build ImagineInterface
completes without error, but the cloned packages aren't accessible when I sayusing DependentPkg
.Is this because registries are now the only option for private dependencies? If so I can add ImagineInterface to HolyLabRegistry. I have a couple of questions about that process, but before I ask them I want to make sure I understand whether registries like this are now required in our workflow.
The text was updated successfully, but these errors were encountered: