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

Check for compatible Julia version #263

Closed
jakobnissen opened this issue Sep 26, 2021 · 7 comments
Closed

Check for compatible Julia version #263

jakobnissen opened this issue Sep 26, 2021 · 7 comments

Comments

@jakobnissen
Copy link
Contributor

Currenly, JET does not check for a valid Julia version when import it. JET is quite sensitive to the version of Julia. Originally, it supported Julia 1.6. The latest version supports 1.7, and if I'm not mistaken, the master branch only supports 1.8?

I keep getting internal JET errors that I think happen due to using the wrong version of JET and/or Julia. It would be of great help if there was some kind of error message when importing JET, or if the compat was correctly specified.

@aviatesk
Copy link
Owner

I tried to make it sure that users can get warning when some JET features aren't supported on their Julia versions.

The latest version supports 1.7, and if I'm not mistaken, the master branch only supports 1.8?

Which exact Julia version are you using ?
I just ran the test suite with 1.7-rc1, and it seems to work correctly at least on my machine and CI builds:

julia> versioninfo()
Julia Version 1.7.0-rc1
Commit 9eade6195e (2021-09-12 06:45 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, icelake-client)
Environment:
  JULIA_EDITOR = code
  JULIA_PKG_DEVDIR = /Users/aviatesk/julia/packages
  JULIA_PROJECT = @.

shell> git log --oneline --max-count 3
89544c22 (HEAD -> master, origin/master) update to https://github.com/JuliaLang/julia/pull/42342
4659d480 enable optimization analysis tests
2983f2cd docs: fixup

(JET) pkg> st
     Project JET v0.5.0
      Status `~/julia/packages/JET/Project.toml`
  [aa1ae85d] JuliaInterpreter v0.8.21 `~/julia/packages/JuliaInterpreter`
  [6f1432cf] LoweredCodeUtils v2.1.2 `~/julia/packages/LoweredCodeUtils`
  [1914dd2f] MacroTools v0.5.8
  [295af30f] Revise v3.1.19 `~/julia/packages/Revise`
  [b77e0a4c] InteractiveUtils
  [44cfe95a] Pkg v1.8.0
  [8dfed614] Test

(JET) pkg> test
     Testing JET
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1488
      Status `/private/var/folders/28/jpsyzp6971s99n6bd4_k6fgm0000gn/T/jl_uIisXe/Project.toml`
  [c3a54625] JET v0.5.0 `~/julia/packages/JET`
  [aa1ae85d] JuliaInterpreter v0.8.21 `~/julia/packages/JuliaInterpreter`
  [6f1432cf] LoweredCodeUtils v2.1.2 `~/julia/packages/LoweredCodeUtils`
  [1914dd2f] MacroTools v0.5.8
  [295af30f] Revise v3.1.19 `~/julia/packages/Revise`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [56ddb016] Logging `@stdlib/Logging`
  [44cfe95a] Pkg `@stdlib/Pkg`
  [9a3f8284] Random `@stdlib/Random`
  [8dfed614] Test `@stdlib/Test`
      Status `/private/var/folders/28/jpsyzp6971s99n6bd4_k6fgm0000gn/T/jl_uIisXe/Manifest.toml`
  [da1fd8a2] CodeTracking v1.0.6 `~/julia/packages/CodeTracking`
  [c3a54625] JET v0.5.0 `~/julia/packages/JET`
  [aa1ae85d] JuliaInterpreter v0.8.21 `~/julia/packages/JuliaInterpreter`
  [6f1432cf] LoweredCodeUtils v2.1.2 `~/julia/packages/LoweredCodeUtils`
  [1914dd2f] MacroTools v0.5.8
  [bac558e1] OrderedCollections v1.4.1
  [ae029012] Requires v1.1.3
  [295af30f] Revise v3.1.19 `~/julia/packages/Revise`
  [0dad84c5] ArgTools `@stdlib/ArgTools`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [ade2ca70] Dates `@stdlib/Dates`
  [8ba89e20] Distributed `@stdlib/Distributed`
  [f43a241f] Downloads `@stdlib/Downloads`
  [7b1f6079] FileWatching `@stdlib/FileWatching`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [b27032c2] LibCURL `@stdlib/LibCURL`
  [76f85450] LibGit2 `@stdlib/LibGit2`
  [8f399da3] Libdl `@stdlib/Libdl`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [ca575930] NetworkOptions `@stdlib/NetworkOptions`
  [44cfe95a] Pkg `@stdlib/Pkg`
  [de0858da] Printf `@stdlib/Printf`
  [3fa0cd96] REPL `@stdlib/REPL`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [6462fe0b] Sockets `@stdlib/Sockets`
  [fa267f1f] TOML `@stdlib/TOML`
  [a4e569a6] Tar `@stdlib/Tar`
  [8dfed614] Test `@stdlib/Test`
  [cf7118a7] UUIDs `@stdlib/UUIDs`
  [4ec0a83e] Unicode `@stdlib/Unicode`
  [deac9b47] LibCURL_jll `@stdlib/LibCURL_jll`
  [29816b5a] LibSSH2_jll `@stdlib/LibSSH2_jll`
  [c8ffd9c3] MbedTLS_jll `@stdlib/MbedTLS_jll`
  [14a3606d] MozillaCACerts_jll `@stdlib/MozillaCACerts_jll`
  [83775a58] Zlib_jll `@stdlib/Zlib_jll`
  [8e850ede] nghttp2_jll `@stdlib/nghttp2_jll`
  [3f19e933] p7zip_jll `@stdlib/p7zip_jll`
     Testing Running tests...
Test Summary: | Pass  Broken  Total
JET.jl        |  767       6    773
     Testing JET tests passed

@jakobnissen
Copy link
Contributor Author

This happens with JET 0.4.6 (latest in General Registry) and Julia 1.7-rc1:

julia> using BioSequences, JET

julia> @report_call translate(dna"TAG")
ERROR: BoundsError: attempt to access Nothing at index [2]

The issue is that JET 0.4.6 has its Julia compat set as 1.6, which implies it's compatible with all Julia versions from 1.6 to 2.0, when it is in fact not compatible with version 1.7. The correct compat should be ~1.6.

@aviatesk
Copy link
Owner

Hh, I get it. Do you think it would be reasonable to release 0.4.7, that specifies the compatibility as ~1.6 ?

@jakobnissen
Copy link
Contributor Author

jakobnissen commented Sep 26, 2021

Hm... not sure. If you have Julia 1.7, then even if you have released a version 0.4.7 incompatible with your version, the resolver will simply download JET 0.4.6 as that will be the latest release marked as compatible. You can release a 0.4.7 which prints an error message if it detects Julia 1.7 or higher, and then for JET 0.5.0 set the Julia compat to ~1.7.
The problem will then solve itself once you release 0.5.

@aviatesk
Copy link
Owner

Yeah, that sounds like a pretty reasonable resolution. Thanks for your suggestion. I will release 0.4.7 tomorrow.

@timholy
Copy link
Collaborator

timholy commented Sep 26, 2021

It's also possible to update the registry to retroactively fix compatibility.

@aviatesk
Copy link
Owner

yeah, that might be better.

xref: JuliaRegistries/General#45588

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

3 participants