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

Greedy feature request: Support changing manifest #238

Closed
Keno opened this issue Jan 25, 2019 · 2 comments
Closed

Greedy feature request: Support changing manifest #238

Keno opened this issue Jan 25, 2019 · 2 comments

Comments

@Keno
Copy link
Collaborator

Keno commented Jan 25, 2019

It often happens that I find a bug in a package that one of my packages depends on, so I dev it, but now I have the wrong package loaded. Often it's actually the same package as I already have loaded (because dev just gave me the same contents but as a git repo), but in a different place. It would be nice if Revise could switch over the module to the dev'ed copy.

@timholy
Copy link
Owner

timholy commented Jan 25, 2019

Fixed in #217.

julia> Example.f()
ERROR: MethodError: no method matching f()
Stacktrace:
 [1] top-level scope at none:0

(v1) pkg> dev Example
[ Info: Path `/home/tim/.julia/dev/Example` exists and looks like the correct package, using existing path
 Resolving package versions...
  Updating `~/.julia/environments/v1/Project.toml`
  [7876af07]  Example v0.5.1  v0.5.1+ [`~/.julia/dev/Example`]
  Updating `~/.julia/environments/v1/Manifest.toml`
  [7876af07]  Example v0.5.1  v0.5.1+ [`~/.julia/dev/Example`]

julia> Example.f()
π = 3.1415926535897...

(v1) pkg> free Example
 Resolving package versions...
  Updating `~/.julia/environments/v1/Project.toml`
  [7876af07]  Example v0.5.1+ [`~/.julia/dev/Example`]  v0.5.1
  Updating `~/.julia/environments/v1/Manifest.toml`
  [7876af07]  Example v0.5.1+ [`~/.julia/dev/Example`]  v0.5.1

julia> Example.f()
ERROR: MethodError: no method matching f()
Stacktrace:
 [1] top-level scope at none:0

(v1) pkg> dev Example
[ Info: Path `/home/tim/.julia/dev/Example` exists and looks like the correct package, using existing path
 Resolving package versions...
  Updating `~/.julia/environments/v1/Project.toml`
  [7876af07]  Example v0.5.1  v0.5.1+ [`~/.julia/dev/Example`]
  Updating `~/.julia/environments/v1/Manifest.toml`
  [7876af07]  Example v0.5.1  v0.5.1+ [`~/.julia/dev/Example`]

julia> Example.f()
π = 3.1415926535897...

Prediction: you have some old packages lying around, installed prior to the days when added packages were checked out with read-only flags. Do a Pkg.gc() and then see if it works. You might have to forcibly remove and re-add some things.

@timholy
Copy link
Owner

timholy commented Jan 31, 2019

Closing pending a MWE that illustrates a problem with the solution currently in place.

@timholy timholy closed this as completed Jan 31, 2019
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

2 participants