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

"No Changes to ~/PkgA/Manifest.toml" is misleading since there can be changes #3066

Open
ericphanson opened this issue Apr 22, 2022 · 1 comment · May be fixed by #3806
Open

"No Changes to ~/PkgA/Manifest.toml" is misleading since there can be changes #3066

ericphanson opened this issue Apr 22, 2022 · 1 comment · May be fixed by #3806

Comments

@ericphanson
Copy link
Contributor

ericphanson commented Apr 22, 2022

This is a "known" issue but I couldn't find it filed anywhere. If resolve fixes the dependencies of a dev'd package in a way that doesn't add new dependencies to the overall Manifest, then "no changes" are reported, even if the Manifest is indeed changed.

❯ julia -q
(@v1.7) pkg> generate PkgA
  Generating  project PkgA:
    PkgA/Project.toml
    PkgA/src/PkgA.jl

(@v1.7) pkg> generate PkgB
  Generating  project PkgB:
    PkgB/Project.toml
    PkgB/src/PkgB.jl

(@v1.7) pkg> activate PkgB
  Activating project at `~/PkgB`

(PkgB) pkg> add Dates
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `~/PkgB/Project.toml`
  [ade2ca70] + Dates
    Updating `~/PkgB/Manifest.toml`
  [ade2ca70] + Dates
  [de0858da] + Printf
  [4ec0a83e] + Unicode
Precompiling project...
  1 dependency successfully precompiled in 1 seconds

(PkgB) pkg> activate PkgA
  Activating project at `~/PkgA`

(PkgA) pkg> dev ./PkgB
   Resolving package versions...
    Updating `~/PkgA/Project.toml`
  [1821aa1f] + PkgB v0.1.0 `../PkgB`
    Updating `~/PkgA/Manifest.toml`
  [1821aa1f] + PkgB v0.1.0 `../PkgB`
  [ade2ca70] + Dates
  [de0858da] + Printf
  [4ec0a83e] + Unicode

Ok, now we have PkgA which dev's PkgB, which depends on Dates. All is well. Now edit PkgB to do using Unicode. Then

> julia -q --project=PkgA
julia> using PkgB
[ Info: Precompiling PkgB [1821aa1f-13ce-41b2-bd12-ba9ec74d35d8]
┌ Warning: Package PkgB does not have Unicode in its dependencies:- If you have PkgB checked out for development and have
│   added Unicode 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 PkgB
└ Loading Unicode into PkgB from project dependency, future warnings for PkgB are suppressed.

Ok, we need to add Unicode to PkgB's deps and resolve:

(PkgA) pkg> activate PkgB
  Activating project at `~/PkgB`

(PkgB) pkg> add Unicode
   Resolving package versions...
    Updating `~/PkgB/Project.toml`
  [4ec0a83e] + Unicode
  No Changes to `~/PkgB/Manifest.toml`

(PkgB) pkg> activate PkgA
  Activating project at `~/PkgA`

(PkgA) pkg> resolve
  No Changes to `~/PkgA/Project.toml`
  No Changes to `~/PkgA/Manifest.toml`

No changes to the manifest or project! However, the problem has indeed been fixed:

❯ julia -q --project=PkgA
julia> using PkgB

(no warnings).

I think we should change "no changes" to something more accurate, like "No added or removed packages".

@giordano
Copy link
Contributor

giordano commented Jul 2, 2023

On Slack @IanButterworth suggested the following alternative message:

No changes to the dependencies in /path/to/Manifest.toml but metadata was updated

which I think nicely addresses the main issue reported here (the Manifest file did change even if list of dependencies didn't).

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

Successfully merging a pull request may close this issue.

2 participants