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 BasicREPL has no field interface #4048

Closed
fonsp opened this issue Oct 14, 2024 · 2 comments
Closed

type BasicREPL has no field interface #4048

fonsp opened this issue Oct 14, 2024 · 2 comments

Comments

@fonsp
Copy link
Member

fonsp commented Oct 14, 2024

A user posted fonsp/Pluto.jl#3059 where the REPL printed the following error after running using Pluto:

ERROR: InitError: type BasicREPL has no field interface
Stacktrace:
  [1] getproperty
    @ ./Base.jl:49 [inlined]
  [2] repl_init(repl::REPL.BasicREPL)
    @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:164
  [3] __init__()
    @ REPLExt ~/.julia/juliaup/julia-1.11.0+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:305
  [4] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{…}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [7] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{…}, DEPOT_PATH::Vector{…})
    @ Base ./loading.jl:1959
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2435
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2300
 [11] #invoke_in_world#3
    @ ./essentials.jl:1088 [inlined]
 [12] invoke_in_world
    @ ./essentials.jl:1085 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2287
 [14] macro expansion
    @ ./loading.jl:2226 [inlined]
 [15] macro expansion
    @ ./lock.jl:273 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2183
 [17] #invoke_in_world#3
    @ ./essentials.jl:1088 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:1085 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2176
during initialization of module REPLExt

Pointing here:

main_mode = repl.interface.modes[1]

Why did this error happen, and how is it related to Pluto?

@fonsp
Copy link
Member Author

fonsp commented Nov 13, 2024

@IanButterworth I was able to reproduce the issue by setting a clean depot. Has this been fixed?

➜  ~ JULIA_DEPOT_PATH="/Users/fons/Downloads/derp" julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.1 (2024-10-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.11) pkg> dev /Users/fons/Documents/Pluto.jl/
  Installing known registries into `~/Downloads/derp`
       Added `General` registry to ~/Downloads/derp/registries
   Resolving package versions...
   Installed RegistryInstances ─────────── v0.1.0
   Installed OpenSSL_jll ───────────────── v3.0.15+1
   Installed BitFlags ──────────────────── v0.1.9
   Installed TableTraits ───────────────── v1.0.1
   Installed Tricks ────────────────────── v0.1.9
   Installed LoggingExtras ─────────────── v1.1.0
   Installed Scratch ───────────────────── v1.2.1
   Installed Preferences ───────────────── v1.4.3
   Installed SimpleBufferStream ────────── v1.2.0
   Installed Tables ────────────────────── v1.12.0
   Installed DataAPI ───────────────────── v1.16.0
   Installed PrecompileSignatures ──────── v3.0.3
   Installed RelocatableFolders ────────── v1.0.1
   Installed Malt ──────────────────────── v1.1.2
   Installed PlutoDependencyExplorer ───── v1.2.0
   Installed ExproniconLite ────────────── v0.10.13
   Installed ConcurrentUtilities ───────── v2.4.2
   Installed JLLWrappers ───────────────── v1.6.1
   Installed DataValueInterfaces ───────── v1.0.0
   Installed IteratorInterfaceExtensions ─ v1.0.0
   Installed PrecompileTools ───────────── v1.2.1
   Installed OrderedCollections ────────── v1.6.3
   Installed URIs ──────────────────────── v1.5.1
   Installed MIMEs ─────────────────────── v1.0.0
   Installed FuzzyCompletions ──────────── v0.5.5
   Installed TranscodingStreams ────────── v0.11.3
   Installed MsgPack ───────────────────── v1.2.1
   Installed OpenSSL ───────────────────── v1.4.3
   Installed MbedTLS ───────────────────── v1.1.9
   Installed HTTP ──────────────────────── v1.10.10
   Installed LazilyInitializedFields ───── v1.3.0
   Installed CodecZlib ─────────────────── v0.7.6
   Installed ExpressionExplorer ────────── v1.1.0
   Installed ExceptionUnwrapping ───────── v0.1.10
   Installed HypertextLiteral ──────────── v0.9.5
   Installed Configurations ────────────── v0.17.6
  Downloaded artifact: OpenSSL
    Updating `~/Downloads/derp/environments/v1.11/Project.toml`
  [c3e4b0f8] + Pluto v0.20.3 `~/Documents/Pluto.jl`
    Updating `~/Downloads/derp/environments/v1.11/Manifest.toml`
  [d1d4a3ce] + BitFlags v0.1.9
  [944b1d66] + CodecZlib v0.7.6
  [f0e56b4a] + ConcurrentUtilities v2.4.2
  [5218b696] + Configurations v0.17.6
  [9a962f9c] + DataAPI v1.16.0
  [e2d170a0] + DataValueInterfaces v1.0.0
  [460bff9d] + ExceptionUnwrapping v0.1.10
  [21656369] + ExpressionExplorer v1.1.0
  [55351af7] + ExproniconLite v0.10.13
  [fb4132e2] + FuzzyCompletions v0.5.5
  [cd3eb016] + HTTP v1.10.10
  [ac1192a8] + HypertextLiteral v0.9.5
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.6.1
  [0e77f7df] + LazilyInitializedFields v1.3.0
  [e6f89c97] + LoggingExtras v1.1.0
  [6c6e2e6c] + MIMEs v1.0.0
  [36869731] + Malt v1.1.2
  [739be429] + MbedTLS v1.1.9
  [99f44e22] + MsgPack v1.2.1
  [4d8831e6] + OpenSSL v1.4.3
  [bac558e1] + OrderedCollections v1.6.3
  [c3e4b0f8] + Pluto v0.20.3 `~/Documents/Pluto.jl`
  [72656b73] + PlutoDependencyExplorer v1.2.0
  [91cefc8d] + PrecompileSignatures v3.0.3
  [aea7be01] + PrecompileTools v1.2.1
  [21216c6a] + Preferences v1.4.3
  [2792f1a3] + RegistryInstances v0.1.0
  [05181044] + RelocatableFolders v1.0.1
  [6c6a2e73] + Scratch v1.2.1
  [777ac1f9] + SimpleBufferStream v1.2.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.12.0
  [3bb67fe8] + TranscodingStreams v0.11.3
  [410a4b4d] + Tricks v0.1.9
  [5c2747f8] + URIs v1.5.1
  [458c3c95] + OpenSSL_jll v3.0.15+1
  [0dad84c5] + ArgTools v1.1.2
  [56f22d72] + Artifacts v1.11.0
  [2a0f44e3] + Base64 v1.11.0
  [ade2ca70] + Dates v1.11.0
  [8ba89e20] + Distributed v1.11.0
  [f43a241f] + Downloads v1.6.0
  [7b1f6079] + FileWatching v1.11.0
  [b77e0a4c] + InteractiveUtils v1.11.0
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2 v1.11.0
  [8f399da3] + Libdl v1.11.0
  [56ddb016] + Logging v1.11.0
  [d6f4376e] + Markdown v1.11.0
  [ca575930] + NetworkOptions v1.2.0
  [44cfe95a] + Pkg v1.11.0
  [de0858da] + Printf v1.11.0
  [3fa0cd96] + REPL v1.11.0
  [9a3f8284] + Random v1.11.0
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization v1.11.0
  [6462fe0b] + Sockets v1.11.0
  [f489334b] + StyledStrings v1.11.0
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [8dfed614] + Test v1.11.0
  [cf7118a7] + UUIDs v1.11.0
  [4ec0a83e] + Unicode v1.11.0
  [deac9b47] + LibCURL_jll v8.6.0+0
  [e37daf67] + LibGit2_jll v1.7.2+0
  [29816b5a] + LibSSH2_jll v1.11.0+1
  [c8ffd9c3] + MbedTLS_jll v2.28.6+0
  [14a3606d] + MozillaCACerts_jll v2023.12.12
  [83775a58] + Zlib_jll v1.2.13+1
  [8e850ede] + nghttp2_jll v1.59.0+0
  [3f19e933] + p7zip_jll v17.4.0+2

(@v1.11) pkg> precompile
Precompiling project...
  67 dependencies successfully precompiled in 278 seconds

julia> DEPOT_PATH
1-element Vector{String}:
 "/Users/fons/Downloads/derp"

julia> import Pluto; Pluto.run()
ERROR: InitError: MethodError: no method matching repl_init(::REPL.LineEditREPL)
The function `repl_init` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  repl_init(::REPL.AbstractREPL)
   @ REPLExt ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:163

Stacktrace:
  [1] __init__()
    @ REPLExt ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Pkg/ext/REPLExt/REPLExt.jl:305
  [2] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [3] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [4] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [5] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:1969
  [7] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2450
  [8] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2315
  [9] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [10] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [11] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2302
 [12] macro expansion
    @ ./loading.jl:2241 [inlined]
 [13] macro expansion
    @ ./lock.jl:273 [inlined]
 [14] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2198
 [15] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [16] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [17] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2191
during initialization of module REPLExt

@IanButterworth
Copy link
Member

JuliaLang/julia#56228 is the place to check

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

No branches or pull requests

2 participants