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

type ReadOnlyMemoryError has no field code #42575

Closed
giordano opened this issue Apr 8, 2021 · 2 comments · Fixed by #42576
Closed

type ReadOnlyMemoryError has no field code #42575

giordano opened this issue Apr 8, 2021 · 2 comments · Fixed by #42576
Labels
bug Indicates an unexpected problem or unintended behavior libgit2 The libgit2 library or the LibGit2 stdlib module

Comments

@giordano
Copy link
Contributor

giordano commented Apr 8, 2021

Julia v1.6.0, my registry is a git repository, I checked out a branch different from master, trying to run up I get

(tmp) pkg> up
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Cannot perform fast-forward merge
└ @ LibGit2 /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibGit2/src/merge.jl:237
ERROR: type ReadOnlyMemoryError has no field code
Stacktrace:
  [1] getproperty(x::ReadOnlyMemoryError, f::Symbol)
    @ Base ./Base.jl:33
  [2] commit(rb::LibGit2.GitRebase, sig::LibGit2.GitSignature)
    @ LibGit2 /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibGit2/src/rebase.jl:86
  [3] (::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String})(head_ref::LibGit2.GitReference)
    @ LibGit2 /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibGit2/src/LibGit2.jl:836
  [4] with(f::LibGit2.var"#148#149"{LibGit2.GitRepo, String, String}, obj::LibGit2.GitReference)
    @ LibGit2 /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibGit2/src/types.jl:1150
  [5] rebase! (repeats 2 times)
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/LibGit2/src/LibGit2.jl:813 [inlined]
  [6] update_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}; force::Bool)
    @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:1204
  [7] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:236
  [8] up
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:230 [inlined]
  [9] #up#38
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:73 [inlined]
 [10] up(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:72
 [11] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:408
 [12] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:386
 [13] do_cmd
    @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
 [14] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:550
 [15] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [16] invokelatest
    @ ./essentials.jl:706 [inlined]
 [17] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2441
 [18] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
 [19] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:406
@giordano
Copy link
Contributor Author

giordano commented Apr 8, 2021

In particular, the local branch was rebased on top of master and was different from the one from origin, I believe the divergence between the local and the remote branch is what triggers the issue (but why should Pkg care about it?)

@IanButterworth IanButterworth transferred this issue from JuliaLang/Pkg.jl Oct 10, 2021
IanButterworth added a commit to IanButterworth/julia that referenced this issue Oct 10, 2021
@DilumAluthge DilumAluthge added bug Indicates an unexpected problem or unintended behavior libgit2 The libgit2 library or the LibGit2 stdlib module labels Oct 10, 2021
KristofferC pushed a commit that referenced this issue Oct 11, 2021
@vtjnash
Copy link
Member

vtjnash commented Oct 12, 2021

Why didn't we print the whole caused-by stacktrace here, and instead truncate it after the first exception?

KristofferC pushed a commit that referenced this issue Oct 19, 2021
KristofferC pushed a commit that referenced this issue Nov 11, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Mar 8, 2022
staticfloat pushed a commit that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior libgit2 The libgit2 library or the LibGit2 stdlib module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants