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

Add a test for get_addable_spec #207

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

giordano
Copy link
Member

This makes sure we can reliably work around an issue in Pkg.

@giordano
Copy link
Member Author

Uhm, nope:

Setup: Error During Test at /home/runner/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:145
  Test threw exception
  Expression: setup_dependencies(prefix, getpkg.(dependencies), platform) isa Vector{String}
  expected package `LibOSXUnwind_jll [a83860b7]` to exist at path `/home/runner/.julia/packages/LibOSXUnwind_jll/avPRF`
  Stacktrace:
    [1] pkgerror(msg::String)
      @ Pkg.Types /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
    [2] collect_fixed!(env::Pkg.Types.EnvCache, pkgs::Vector{Pkg.Types.PackageSpec}, names::Dict{UUID, String})
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:266
    [3] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:317
    [4] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1197
    [5] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1168
    [6] _resolve(io::Base.DevNull, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1203
    [7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{UUID}; preserve::Pkg.Types.PreserveLevel, platform::Platform)
      @ Pkg.Operations /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1219
    [8] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Platform, kwargs::Base.Pairs{Symbol, Base.DevNull, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.DevNull}}})
      @ Pkg.API /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/API.jl:275
    [9] (::BinaryBuilderBase.var"#88#94"{Bool, Prefix, Vector{Pkg.Types.PackageSpec}, Platform, Vector{String}, Vector{String}})()
      @ BinaryBuilderBase ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:572
   [10] activate(f::BinaryBuilderBase.var"#88#94"{Bool, Prefix, Vector{Pkg.Types.PackageSpec}, Platform, Vector{String}, Vector{String}}, new_project::String)
      @ Pkg.API /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Pkg/src/API.jl:1678
   [11] setup_dependencies(prefix::Prefix, dependencies::Vector{Pkg.Types.PackageSpec}, platform::Platform; verbose::Bool)
      @ BinaryBuilderBase ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:565
   [12] setup_dependencies
      @ ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/src/Prefix.jl:539 [inlined]
   [13] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.8/Test/src/Test.jl:463 [inlined]
   [14] (::var"#37#54")(dir::String)
      @ Main ~/work/BinaryBuilderBase.jl/BinaryBuilderBase.jl/test/dependencies.jl:145

This makes sure we can reliably work around an issue in Pkg.
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 this pull request may close these issues.

1 participant