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

import PkgTemplates fails with PkgTemplates#master and Julia master #294

Closed
DilumAluthge opened this issue May 15, 2021 · 5 comments
Closed

Comments

@DilumAluthge
Copy link
Member

import PkgTemplates fails with PkgTemplates#master and Julia master:

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.0-DEV.1105 (2021-05-14)
 _/ |\__'_|_|_|\__'_|  |  Commit 2dfe8d748b (0 days old master)
|__/                   |

julia> import PkgTemplates
[ Info: Precompiling PkgTemplates [14b8a8f1-9102-5b29-a752-f990bacb7fe1]
ERROR: LoadError: MethodError: Cannot `convert` an object of type String to an object of type Base.UUID
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:228
  Base.UUID(::AbstractString) at uuid.jl:82
  Base.UUID(::Any) at uuid.jl:9
Stacktrace:
  [1] convert(#unused#::Type{Union{Nothing, Base.UUID}}, x::String)
    @ Base ./some.jl:36
  [2] Pkg.Types.PackageSpec(name::String, uuid::String, version::Pkg.Versions.VersionSpec, tree_hash::Nothing, repo::Pkg.Types.GitRepo, path::Nothing, pinned::Bool, url::Nothing, rev::Nothing, subdir::Nothing)
    @ Pkg.Types ~/dev/repos/JuliaLang/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Types.jl:92
  [3] Pkg.Types.PackageSpec(; name::String, uuid::String, version::Pkg.Versions.VersionSpec, tree_hash::Nothing, repo::Pkg.Types.GitRepo, path::Nothing, pinned::Bool, url::Nothing, rev::Nothing, subdir::Nothing)
    @ Pkg.Types ./util.jl:471
  [4] top-level scope
    @ ~/.julia/packages/PkgTemplates/1TTni/src/plugins/tests.jl:2
  [5] include(mod::Module, _path::String)
    @ Base ./Base.jl:389
  [6] include(x::String)
    @ PkgTemplates ~/.julia/packages/PkgTemplates/1TTni/src/PkgTemplates.jl:2
  [7] top-level scope
    @ ~/.julia/packages/PkgTemplates/1TTni/src/plugin.jl:351
  [8] include(mod::Module, _path::String)
    @ Base ./Base.jl:389
  [9] include(x::String)
    @ PkgTemplates ~/.julia/packages/PkgTemplates/1TTni/src/PkgTemplates.jl:2
 [10] top-level scope
    @ ~/.julia/packages/PkgTemplates/1TTni/src/PkgTemplates.jl:53
 [11] include
    @ ./Base.jl:389 [inlined]
 [12] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1219
 [13] top-level scope
    @ none:1
 [14] eval
    @ ./boot.jl:369 [inlined]
 [15] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [16] top-level scope
    @ none:1
in expression starting at /Users/dilum/.julia/packages/PkgTemplates/1TTni/src/plugins/tests.jl:2
in expression starting at /Users/dilum/.julia/packages/PkgTemplates/1TTni/src/plugin.jl:351
in expression starting at /Users/dilum/.julia/packages/PkgTemplates/1TTni/src/PkgTemplates.jl:1
ERROR: Failed to precompile PkgTemplates [14b8a8f1-9102-5b29-a752-f990bacb7fe1] to /Users/dilum/.julia/compiled/v1.7/PkgTemplates/jl_Q1ZgyD.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1367
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1311
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1021
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901

julia> import Pkg

julia> Pkg.status()
      Status `~/.julia/environments/v1.7/Project.toml`
  [14b8a8f1] PkgTemplates v0.7.16 `https://github.com/invenia/PkgTemplates.jl#master`

julia> import InteractiveUtils

julia> InteractiveUtils.versioninfo()
Julia Version 1.7.0-DEV.1105
Commit 2dfe8d748b (2021-05-14 16:42 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin20.4.0)
  CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_PKG_SERVER =
  JULIA_CUDA_VERBOSE = true
@nickrobinson251
Copy link
Collaborator

Hmm. I guess we didn't see this sooner because of #287

The implicated line is
https://github.com/invenia/PkgTemplates.jl/blob/4302ecb0a8f3304ca519796bae70c196794692c9/src/plugins/tests.jl#L1-2

Was there a breaking change to PackageSpec?

@DilumAluthge
Copy link
Member Author

I do think there were some changes made to the PackageSpec constructors. I wasn't aware that there were any breaking changes to the public API, though.

@00vareladavid may know more.

@DilumAluthge
Copy link
Member Author

Any update on this? @nickrobinson251 @00vareladavid @christopher-dG

@DilumAluthge
Copy link
Member Author

PR #295 fixes this issue for me locally.

@nickrobinson251
Copy link
Collaborator

closed via JuliaLang/Pkg.jl#2589

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