I have checked out a registered package for development:
(v0.7) pkg>develop CompScienceMeshes
I have created a new branch and made some modifications in .julia/dev/ComScienceMeshes
. Next, I tried to run the unit tests:
(v0.7) pkg>test CompScienceMeshes
This results in error message suggesting my fixes are not taken into account. Inspection of the error output indicates that the code loaded by test
is the registered version in packages/slug/CompScienceMeshes
as opposed to the working branch in the tracked development directory dev/CompScienceMeshes
. Am I doing something wrong?
Perhaps you had already loaded the module in the Julia session before making the changes or before you did develop CompScienceMeshes
?
This is possible but I was working under the assumption that test
spins up a new Julia engine as was the case for Pkg.test
in v0.6
.
I played around some more and I got the issue resolved by:
- committing my changes to git
- updating:
pkg> up CompScienceMeshes
(this creates a corresponding packages/new_slug/CompScienceMeshes
)
- testing:
pkg> test CompScienceMeshes
(this loads from packages/new_slug/CompScienceMeshes
)
From what you are saying it sounds I should restart Julia to test my modifications. Could Revise.jl
make this easier?
Yea, that is still the case, nevermind me then
What does pkg> st
say? Also can you try Base.find_package("CompScienceMeshes")
?
Status output seems to imply the package location resolves to the development directory:
(v0.7) pkg> st
Status `C:\Users\krcools\.julia\environments\v0.7\Project.toml`
[3e66a162] CompScienceMeshes v0.1.2+ # (C:\Users\krcools\.julia\dev\CompScienceMeshes)
Running Base.find_package
returns the location used by pkg> test CompScienceMeshes
:
julia> Base.find_package("CompScienceMeshes")
"C:\\Users\\krcools\\.julia\\packages\\CompScienceMeshes\\IXhQ\\src\\CompScienceMeshes.jl"
It looks like you have add
ed and not dev
eloped the package. This means it will only be updated when you do an explicit update with new commits. Try rm
the package and then use dev
to add it.
I indeed first ran add
and then dev
. Is this not a very common scenario? First you decide to check out a package, then you find out is has a bug or a missing feature, and then you run dev
on the same package. Does Pkg3 not allow this chain of events?
Yes, but it looked like the dev
didn’t “take”.
Yes, i think this is also related to the bugs experienced in the other threads. When a github tagged version of a package is installed and then the dev
command is run, then the environmnets/v0.7/Manifest.toml
is not properly updated to point towards the dev
path instead of the repo
on github. One can manually fix this.