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

Develop can create an incorrect Manifest; moves weakdeps to deps #3551

Open
kmp5VT opened this issue Jul 20, 2023 · 2 comments
Open

Develop can create an incorrect Manifest; moves weakdeps to deps #3551

kmp5VT opened this issue Jul 20, 2023 · 2 comments

Comments

@kmp5VT
Copy link

kmp5VT commented Jul 20, 2023

Hi I reported this problem on the julia discourse and this is a repost here because I think its actually a bug see
https://discourse.julialang.org/t/does-pkg-develop-have-different-behavior-with-and-without-path/101325

I am having an interesting issue with the Package manager system and wondering if its related to the way my Project.toml is set up. The issue is that when I call Pkg.develop with and without a path to a project in .julia/dev two different Manifest.toml are instantiated. One seems to have an error where Pkg is not properly creating a weakdeps section. Here is my julia info

Julia Version 1.9.2
Commit e4ee485e909 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 32 × Intel(R) Xeon(R) Gold 6244 CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, cascadelake)
  Threads: 1 on 32 virtual cores
Environment:
  LD_LIBRARY_PATH = /mnt/sw/nix/store/wxp5xscxcqq0l1nlrv8k136qs5wqaln6-vscode-1.73.1/lib:/mnt/sw/nix/store/hayjz1l94cb2ky37bhcv71aygjzq7fci-openblas-0.3.21/lib:/cm/shared/apps/slurm/current/lib64:/run/opengl-driver/lib

I installed julia using juliaup and am using juliaup default release

Here is the project.toml

name = "NDTensors"
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
authors = ["Matthew Fishman <mfishman@flatironinstitute.org>"]
version = "0.2.0"

[deps]
somedeps = "UUID"

[compat]
somedeps = "version#"

[weakdeps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[extensions]
NDTensorCUDA = "CUDA"

The issue happens when I try to dev my project so I have the folder .julia/dev/NDTensors and cd to .julia/dev. When I run this command $julia --project=temp -e 'using Pkg; Pkg.develop(path="./NDTensors")' or this $julia --project=temp -e 'using Pkg; Pkg.develop(path="NDTensors")' I get this error

Resolving package versions...
ERROR: `NDTensors=23ae76d9-e61a-49c4-8f12-3f1a16adf9cf` depends on `CUDA=052768ef-5323-5732-b1bb-66c8b64840ba`, but no such entry exists in the manifest.
and Pkg has created a manifest (temp/Manifest.toml) that looks like this
[[deps.NDTensors]]
path = "../NDTensors"
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
version = "0.2.0"

    [deps.NDTensors.deps]
    somedeps = "UUID"
    CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

which looks like Pkg has incorrectly put my weakdeps in deps. However if I run this command $julia --project=temp -e 'using Pkg; Pkg.develop("NDTensors") Pkg generates this manifest

[[deps.NDTensors]]
deps = ["somedeps"]
path = "/home/.julia/dev/NDTensors"
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
version = "0.2.0"

    [deps.NDTensors.extensions]
    NDTensorCUDA = "CUDA"

    [deps.NDTensors.weakdeps]
    CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
@IanButterworth
Copy link
Sponsor Member

I wonder if this is related to #3327 given I saw it when dev-ing

@evetion
Copy link
Sponsor Member

evetion commented Jul 31, 2023

Just hit this as well in testing for GeoInterface, in which the common design for testing subpackages does a julia --project=monorepo, and than devs all (sub)packages.

I also made a new package from scratch to confirm this issue (ofcourse only on 1.9+) as well. Doing a dev with path=("."), converts the weakdep in the package Project.toml to a dep in the Manifest of the project.

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

3 participants