Skip to content

IJulia world age problem when precompilation is triggered (no method matching pipe_writer(::IJulia.IJuliaStdio{Base.PipeEndpoint})) #51280

Closed
@svilupp

Description

@svilupp

I wanted to cross-link an issue with IJulia that seems to be affecting 1.10 and 1.11-DEV. This seems to also affect any documentation/report tools that use IJulia execution under the hood (eg, Quarto).

When a package needs precompilation, IJulia will throw the following error:

MethodError: no method matching pipe_writer(::IJulia.IJuliaStdio{Base.PipeEndpoint})
The applicable method may be too new: running in world age 31373, while current world is 31593.

I can replicate this error on Julia 1.10 beta1, 1.10 beta2 and 1.11 (latest main).
1.9.3 works as expected.

MWE:

  • Create a mock module in your temp environment
module ABC

greet() = print("Hello World!")

struct A1 end
struct B1 end

greet(::A1) = print("Hello World!")

x(::A1) = "x"

end # module ABC
  • Add the packages to the project env
  • Create an Ipython notebook with the following cells
using Pkg; Pkg.activate(".")
using StatsPlots # it can help to have some complex package there to trigger the precompilation more often (to get the error)
using ABC
  • If precompilation is triggered by adding or Pkg.precompile(), it seems to work
  • To trigger the error, make some changes in the ABC module that will trigger recompilation (add a new struct and function)
  • When you try to execute the cell with using ABC, the error will be thrown

Versions:

IJulia version: latest (1.24.2)

Versioninfo:

Julia Version 1.10.0-beta2
Commit a468aa1 (2023-08-17 06:27 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 8 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 on 6 virtual cores

Metadata

Metadata

Assignees

Labels

regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions