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

[workspace] Misleading printing of Manifest.toml change #3891

Open
fredrikekre opened this issue May 3, 2024 · 2 comments
Open

[workspace] Misleading printing of Manifest.toml change #3891

fredrikekre opened this issue May 3, 2024 · 2 comments

Comments

@fredrikekre
Copy link
Member

Example:

$ tree .
.
├── Manifest.toml
├── Project.toml
└── test
    └── Project.toml

$ cat Project.toml
[deps]
Example = "7876af07-990d-54b4-ab0e-23690620f79a"

[workspace]
projects = ["test"]

$ julia -e 'using Pkg; Pkg.status()'
Status `/tmp/tmp.C9bJWtPVPR/Project.toml`
  [7876af07] Example v0.5.4 `https://github.com/JuliaLang/Example.jl.git#master`

$ julia --project=test -e 'using Pkg; Pkg.status()'
Status `/tmp/tmp.C9bJWtPVPR/test/Project.toml` (empty project)

$ julia --project=test -e 'using Pkg; Pkg.add("Example")'
   Resolving package versions...
    Updating `/tmp/tmp.C9bJWtPVPR/test/Project.toml`
  [7876af07] + Example v0.5.3
    Updating `/tmp/tmp.C9bJWtPVPR/Manifest.toml`
  [7876af07] + Example v0.5.3

The last line there should be

  [7876af07] ~ Example v0.5.4 `https://github.com/JuliaLang/Example.jl.git#master` ⇒ v0.5.3

instead of

  [7876af07] + Example v0.5.3
@KristofferC
Copy link
Sponsor Member

The reason this happens is that the status printer does a filter of everything that is reachable from the current project and uses that as a diff. Here, Example was not reachable before so it just has it as a +.

@fredrikekre
Copy link
Member Author

Okay, that explains why it works correctly when the thing you add is already a transient dependency in the current project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants