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

JET versions before 0.8.28 are not compatible with Julia 1.11 #104585

Closed
mkitti opened this issue Apr 9, 2024 · 8 comments · Fixed by #104590
Closed

JET versions before 0.8.28 are not compatible with Julia 1.11 #104585

mkitti opened this issue Apr 9, 2024 · 8 comments · Fixed by #104590

Comments

@mkitti
Copy link
Contributor

mkitti commented Apr 9, 2024

aviatesk/JET.jl#610
( aviatesk/JET.jl@cb07600 ) fixed an issue for JET 0.8.28+ so that it is compatible with Julia 1.11. This means that JET versions 0.8.27 and earlier are not compatible with Julia 1.11.

(@v1.11) pkg> activate --temp
  Activating new project at `/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_G7PH1B`

(jl_G7PH1B) pkg> add [email protected]

julia> using JET
Precompiling JET...
Info Given JET was explicitly requested, output will be shown live 
ERROR: LoadError: MethodError: no method matching get_inference_world(::JET.JETAnalyzer{JET.BasicPass})
The function `get_inference_world` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  get_inference_world(::Core.Compiler.NativeInterpreter)
   @ Core compiler/types.jl:402
@giordano
Copy link
Member

giordano commented Apr 9, 2024

CC: @aviatesk

@mkitti
Copy link
Contributor Author

mkitti commented Apr 9, 2024

The primary issue is I ran into is when adding SnoopCompile, resolution prefers JET v0.8.22 with LoweredCodeUtils 2.4.5 rather than JET 0.8.29 with LoweredCoreUtils 2.3.

julia +1.11 -e "using Pkg; Pkg.activate(; temp=true); Pkg.add(\"SnoopCompile\");"
  Activating new project at `/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_ptIpPm`
   Resolving package versions...
    Updating `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_ptIpPm/Project.toml`
  [aa65fe97] + SnoopCompile v2.10.8
    Updating `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_ptIpPm/Manifest.toml`
  [1520ce14] + AbstractTrees v0.4.5
  [da1fd8a2] + CodeTracking v1.3.5
  [3da002f7] + ColorTypes v0.11.5
  [5ae59095] + Colors v0.12.10
  [f68482b8] + Cthulhu v2.12.3
  [5789e2e9] + FileIO v1.16.3
  [53c48c17] + FixedPointNumbers v0.8.4
  [08572546] + FlameGraphs v1.0.0
  [1eca21be] + FoldingTrees v1.2.1
  [9b13fd28] + IndirectArrays v1.0.0
⌃ [c3a54625] + JET v0.8.22
  [692b3bcd] + JLLWrappers v1.5.0
  [aa1ae85d] + JuliaInterpreter v0.9.31
  [70703baa] + JuliaSyntax v0.4.8
  [1d6d02ad] + LeftChildRightSiblingTrees v0.2.0
  [6f1432cf] + LoweredCodeUtils v2.4.5
  [1914dd2f] + MacroTools v0.5.13
  [bac558e1] + OrderedCollections v1.6.3
  [aea7be01] + PrecompileTools v1.2.1
  [21216c6a] + Preferences v1.4.3
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.3.0
  [295af30f] + Revise v3.5.14
  [aa65fe97] + SnoopCompile v2.10.8
  [e2b509da] + SnoopCompileCore v2.10.1
  [10745b16] + Statistics v1.11.1
  [69024149] + StringEncodings v0.3.7
  [d265eb64] + TypedSyntax v1.3.1
  [b8c1c048] + WidthLimitedIO v1.0.1
  [ddb6d928] + YAML v0.4.9
  [94ce4f54] + Libiconv_jll v1.17.0+0
  [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
  [37e2e46d] + LinearAlgebra 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
  [9abbd945] + Profile 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
  [e66e0078] + CompilerSupportLibraries_jll v1.1.1+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
  [4536629a] + OpenBLAS_jll v0.3.26+2
  [83775a58] + Zlib_jll v1.2.13+1
  [8e850b90] + libblastrampoline_jll v5.8.0+1
  [8e850ede] + nghttp2_jll v1.59.0+0
  [3f19e933] + p7zip_jll v17.4.0+2
        Info Packages marked with ⌃ have new versions available and may be upgradable.
Precompiling project...
  ✗ JET
  ✗ SnoopCompile
  0 dependencies successfully precompiled in 8 seconds. 61 already precompiled.

The following 1 direct dependency failed to precompile:

SnoopCompile 

@aviatesk
Copy link
Contributor

I haven't had the chance to work on updating JET, so it hasn't been updated for v1.11 or later.

@mkitti
Copy link
Contributor Author

mkitti commented Apr 10, 2024

I haven't had the chance to work on updating JET, so it hasn't been updated for v1.11 or later.

Yes, I understand. The latest version of the package does at least precompile on Julia 1.11, so that other dependencies such as SnoopCompile.jl can load.

The problem here is that earlier versions before the aforementioned patch do not precompile on Julia 1.11. However, because of the compatibility declarations of older versions of JET, they end up getting installed.

In particular, when adding SnoopCompile, JET.jl 0.8.22 gets installed rather than JET.jl 0.8.29 which works. The older version is selected since the resolver prefers a newer version of LoweredCodeUtils.jl, version, 2.4, which it thinks is compatible with JET.jl 0.8.22.

The proposed registry edits fix the compatibility so that all current JET.jl are only compatible with LoweredCodeUtils.jl up to 2.3. It also changes the compat for earlier versions of JET.jl to be only compatible to Julia 1.10.

Are the above registry changes fine with you?

@aviatesk
Copy link
Contributor

Adding an upper bound to LCU for older JET versions doesn't seem like it would address the root of the issue, right? It looks like the real suggestion is to make JET compatible with Julia versions up to 1.10 (so making it uninstallable for v1.11 and onwards from the first place). But that's led to complications in JET's development, something I've deliberately stayed away from, so I'd really rather not go down that route.

I'd propose this alternative timholy/SnoopCompile.jl#379, which makes SnoopCompile loadable on v1.11 and so on without JET installed successfully.

@mkitti
Copy link
Contributor Author

mkitti commented Apr 10, 2024

JET.jl 0.8.29 loads fine on Julia 1.11 and with these edits will not have an upper bound for Julia.

JET.jl 0.8.27 and earlier do not precompile on Julia 1.11.

@mkitti
Copy link
Contributor Author

mkitti commented Apr 10, 2024

Note that I made the following pull request a couple months ago:
timholy/SnoopCompile.jl#376

@aviatesk
Copy link
Contributor

Ah, I see. So the PR edits Julia upper bound for the earlier version of JET only. That sounds fine. And thanks for your PR on SnoopCompile! I just missed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants