Skip to content

ERROR: MethodError: no method matching startswith(::Base.SHA1, ::String) #4561

@KristofferC

Description

@KristofferC

Something I just saw:

(JuliaSyntaxHighlighting) pkg> resolve
     Cloning git-repo `https://github.com/JuliaLang/JuliaSyntax.jl.git`
ERROR: MethodError: no method matching startswith(::Base.SHA1, ::String)
The function `startswith` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  startswith(::IO, ::Union{SubString{String}, String})
   @ Base strings/util.jl:93
  startswith(::IO, ::AbstractString)
   @ Base strings/util.jl:99
  startswith(::Union{SubString{String}, String}, ::Union{SubString{String}, String})
   @ Base strings/util.jl:69
  ...

Stacktrace:
  [1] (::Pkg.Types.var"#handle_repo_add!##2#handle_repo_add!##3"{Pkg.Types.Context, Pkg.Types.PackageSpec, String})(repo::LibGit2.GitRepo)
    @ Pkg.Types ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/Pkg/src/Types.jl:1030
  [2] with(f::Pkg.Types.var"#handle_repo_add!##2#handle_repo_add!##3"{Pkg.Types.Context, Pkg.Types.PackageSpec, String}, obj::LibGit2.GitRepo)
    @ LibGit2 ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/LibGit2/src/types.jl:1230
  [3] handle_repo_add!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
    @ Pkg.Types ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/Pkg/src/Types.jl:1016
  [4] collect_fixed!(env::Pkg.Types.EnvCache, pkgs::Vector{Pkg.Types.PackageSpec}, names::Dict{Base.UUID, String}, julia_version::VersionNumber)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/Pkg/src/Operations.jl:650
  [5] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber, installed_only::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/Pkg/src/Operations.jl:782
  [6] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel; skip_writing_project::Bool, preserve::Nothing)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.14/Pkg/src/Operations.jl:2477

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions