Skip to content

users function not working on Julia v1.7.1 #36

@simonschoelly

Description

@simonschoelly

There seems to be something broken with the users function with PkgDeps v0.6.2 and Julia v1.7.1. I can reproduce the issues with my local Julia installation,, as well as with the official julia:1.7.1 docker image. In contrast they do not occur with the julia:1.6.0 docker image.

julia> using PkgDeps

julia> users("Flux")
ERROR: ArgumentError: Collection is empty, must contain exactly 1 element
Stacktrace:
 [1] only
   @ ./iterators.jl:1354 [inlined]
 [2] _get_pkg_uuid(pkg_name::String, registry_name::String; depots::Vector{String})
   @ PkgDeps ~/.julia/packages/PkgDeps/afXc8/src/utilities.jl:101
 [3] _get_pkg_uuid
   @ ~/.julia/packages/PkgDeps/afXc8/src/utilities.jl:101 [inlined]
 [4] #users#18
   @ ~/.julia/packages/PkgDeps/afXc8/src/PkgDeps.jl:112 [inlined]
 [5] users (repeats 2 times)
   @ ~/.julia/packages/PkgDeps/afXc8/src/PkgDeps.jl:112 [inlined]
 [6] top-level scope
   @ REPL[7]:1

julia> users(Base.UUID("587475ba-b771-5e3f-ad9e-33799f191a9c"))  # UUID of Flux.jl
String[]

Tests fail as well:


(@v1.7) pkg> test PkgDeps
     Testing PkgDeps
      Status `/tmp/jl_Wwxymf/Project.toml`
  [34da2185] Compat v3.41.0
  [839e9fc8] PkgDeps v0.6.2
  [44cfe95a] Pkg `@stdlib/Pkg`
  [3fa0cd96] REPL `@stdlib/REPL`
  [fa267f1f] TOML `@stdlib/TOML`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
      Status `/tmp/jl_Wwxymf/Manifest.toml`
  [34da2185] Compat v3.41.0
  [839e9fc8] PkgDeps v0.6.2
  [0dad84c5] ArgTools `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8bb1440f] DelimitedFiles `@stdlib/DelimitedFiles`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads `@stdlib/Downloads`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [a63ad114] Mmap `@stdlib/Mmap`
  [ca575930] NetworkOptions `@stdlib/NetworkOptions`
  [44cfe95a] Pkg `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [1a1011a3] SharedArrays `@stdlib/SharedArrays`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [2f01184e] SparseArrays `@stdlib/SparseArrays`
  [10745b16] Statistics `@stdlib/Statistics`
  [fa267f1f] TOML `@stdlib/TOML`
  [a4e569a6] Tar `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [e66e0078] CompilerSupportLibraries_jll `@stdlib/CompilerSupportLibraries_jll`
  [deac9b47] LibCURL_jll `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll `@stdlib/MozillaCACerts_jll`
  [4536629a] OpenBLAS_jll `@stdlib/OpenBLAS_jll`
  [83775a58] Zlib_jll `@stdlib/Zlib_jll`
  [8e850b90] libblastrampoline_jll `@stdlib/libblastrampoline_jll`
  [8e850ede] nghttp2_jll `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll `@stdlib/p7zip_jll`
     Testing Running tests...
exception: Test Failed at /root/.julia/packages/PkgDeps/afXc8/test/runtests.jl:44
  Expression: PkgDeps._get_pkg_uuid("PkgDepsFakePackage", "General")
    Expected: PackageNotInRegistry
      Thrown: ArgumentError
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/PkgDeps/afXc8/test/runtests.jl:44 [inlined]
 [2] macro expansion
   @ /usr/local/julia/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
 [3] macro expansion
   @ ~/.julia/packages/PkgDeps/afXc8/test/runtests.jl:44 [inlined]
 [4] macro expansion
   @ /usr/local/julia/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
 [5] macro expansion
   @ ~/.julia/packages/PkgDeps/afXc8/test/runtests.jl:28 [inlined]
 [6] macro expansion
   @ /usr/local/julia/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
 [7] top-level scope
   @ ~/.julia/packages/PkgDeps/afXc8/test/runtests.jl:14
Test Summary:                   | Pass  Fail  Total
internal functions              |   16     1     17
  _get_pkg_name                 |    2            2
  _get_pkg_uuid                 |    5     1      6
    name to uuid                |    2            2
    Same name in two registries |    2            2
    exception                   |    1     1      2
  _get_latest_version           |    1            1
  _find_alternative_packages    |    1            1
  `_find_latest_pkg_entry`      |    7            7
ERROR: LoadError: Some tests did not pass: 16 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /root/.julia/packages/PkgDeps/afXc8/test/runtests.jl:13
ERROR: Package PkgDeps errored during testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions