-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Trouble using newly-generated packages #418
Comments
Seems like the
|
Thanks, that helps. I can try to edit the docs. Is there any way to add it during What about dependencies, though? (v0.7) pkg> init
Initialized project at /tmp/pkgs/Project.toml
(v0.7) pkg> generate A
Generating project A:
A/Project.toml
A/src/A.jl
julia> open("A/src/A.jl", "w") do io
print(io, """
__precompile__(true)
module A
f(x) = 1
end
""")
end
(v0.7) pkg> dev A
Resolving package versions...
Updating `~/.julia/environments/v0.7/Project.toml`
[b2fc4464] + A v0.1.0 [`/tmp/pkgs/A`]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[b2fc4464] + A v0.1.0 [`/tmp/pkgs/A`]
(v0.7) pkg> generate B
Generating project B:
B/Project.toml
B/src/B.jl
julia> open("B/src/B.jl", "w") do io
print(io, """
__precompile__(true)
module B
using A
g(x) = -1
end
""")
end
(v0.7) pkg> dev B
Resolving package versions...
Updating `~/.julia/environments/v0.7/Project.toml`
[0759b618] + B v0.1.0 [`/tmp/pkgs/B`]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[0759b618] + B v0.1.0 [`/tmp/pkgs/B`]
shell> ls
A B Project.toml
shell> cd B
/tmp/pkgs/B
(v0.7) pkg> add A
Updating registry at `~/.julia/registries/Uncurated`
Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
Resolving package versions...
Updating `~/.julia/environments/v0.7/Project.toml`
[no changes]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[no changes]
(v0.7) pkg> resolve
Resolving package versions...
Updating `~/.julia/environments/v0.7/Project.toml`
[no changes]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[no changes]
shell> cat Project.toml
authors = ["Tim Holy <[email protected]>"]
name = "B"
uuid = "0759b618-75b2-11e8-12bf-7971e41ce912"
version = "0.1.0"
[deps]
shell> cd ..
/tmp/pkgs
julia> using A
[ Info: Precompiling module A
julia> using B
[ Info: Precompiling module B
ERROR: LoadError: ArgumentError: Package B does not have A in its dependencies:
- If you have B checked out for development and have
added A 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 B.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:862
[2] include at ./boot.jl:317 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1075
[4] include(::Module, ::String) at ./sysimg.jl:29
[5] top-level scope at none:0
[6] eval at ./boot.jl:319 [inlined]
[7] eval(::Expr) at ./client.jl:394
[8] top-level scope at ./none:3 [inlined]
[9] top-level scope at ./<missing>:0
in expression starting at /tmp/pkgs/B/src/B.jl:4
ERROR: Failed to precompile B to /home/tim/.julia/compiled/v0.7/B/5WMh.ji.
Stacktrace:
[1] error at ./error.jl:33 [inlined]
[2] compilecache(::Base.PkgId) at ./loading.jl:1205
[3] _require(::Base.PkgId) at ./loading.jl:1007
[4] require(::Base.PkgId) at ./loading.jl:879
[5] require(::Module, ::Symbol) at ./loading.jl:874 |
Yes, perhaps it makes sense to add the generated project automatically? I think the example in your last post worked pre-JuliaLang/julia#27633 where the active environment was automatically determined by
we don't activate Here is how you can make this work now (with
Now we added
|
Seems like there is nothing left to do here |
I'm not exactly sure what fraction of this is supposed to work (julia Commit c1eb3e80e4* (2018-06-21 16:18 UTC)), but here's an annotated session where I had to hack access to one package and failed to figure out how to get a second package to make use of the first:
The text was updated successfully, but these errors were encountered: