I recently upgraded to Julia v1.13 and was pleasantly surprised by how quickly packages downloaded. However, Pluto fails to precompile on my machine, which didn’t used to happen on v1.12.7. It appeared that someone else was having this problem back with Julia v1.6, I preferred to ask again because the proposed solution was closer to a temporary hack than a real solution. I will be grateful for any help, as Pluto is a package i use a lot.
I also saw the warning message, but I’m currently running Pluto with Julia 1.13 and didn’t have any issues so far (I’m on Linux though, unlike the OP).
For me 0.14.2 also errored, but the newest version 1.0.3 worked just fine – it does warn that 1.13 is not yet (fully) supported, sure, but for me it runs just fine.
So looking at the PlutoRunner.jl:372 line in that version:
370 # these deal with some inconsistencies in Julia's internal (undocumented!) variable names
371 const primary_world = filter(in(fieldnames(Method)), [:primary_world, :min_world]) |> first # Julia v1.3 and v1.0 resp.
372 const deleted_world = filter(in(fieldnames(Method)), [:deleted_world, :max_world]) |> first # Julia v1.3 and v1.0 resp.
373 const alive_world_val = getfield(methods(Base.sqrt).ms[1], deleted_world) # typemax(UInt) in Julia v1.3, Int(-1) in Julia 1.0
It looks for internal fields that obviously changed between Julia 1.0 and v1.3 and do not exist in 1.12 or 1.13. filter makes an empty Symbol[] in the latter cases, and first(Symbol[]) throws the reported BoundsError.
Some packages, including Pluto, have to use Julia internals to implement deep features like reactivity. The tradeoff is that those internals are free to change with patches or minor releases, so developers have to track and keep up with those changes. I’m not guessing here; a Pluto co-creator once publicly complained that using internal APIs (well, it’s debatable whether those were APIs to begin with, and it’s definitely not API outside of base Julia) leads to packages breaking (strictly speaking, that’s not what breaking means) and suggested Julia stabilize/constrain its internals into public API Pluto could use. One particular argument in favor of constraining internals was that Julia shouldn’t be a compiler experiment…which is kind of like saying an orange shouldn’t be a fruit.
A package developer who uses enough internals to risk frequent (informal) breakage could constrain their project to Julia versions they know to work. However, Pluto instead opts for a soft runtime warning. Evidently that does not work if Pluto is outdated to the point it fails to run, but as Maucejo, Sevi, and kellertuer mentioned, it does allow us to ignore the warning and try Pluto on newer Julia versions before the Pluto developers validate it.
How can access to undocumented or non-public fields, including by symbol, be automatically detected? Method is a public name that comes with importing Core, so that alone won’t be flagged as an issue.
In the absence of corresponding language features, this can be done by tooling. ExplicitImports.jl helps to implement explicit import statements like using SparseArrays: sparse and, since Julia 1.11, to detect accesses to non-public names.
The Docs.undocumented_names method highlights the exported and public names of a package which miss docstrings.
Documenter.jl by default now errors if a documented name is missed in the documentation.
I skimmed the docs and read more or less the same information. I’m asking about structfields specifically, not global variables, and not necessarily with dot notation. To paraphrase the erroring line, filter(in(fieldnames(Method)), [:deleted_world, :max_world]).