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

@deprecate usage invalid on Julia <=1.7 #299

Closed
MilesCranmer opened this issue Dec 17, 2023 · 8 comments
Closed

@deprecate usage invalid on Julia <=1.7 #299

MilesCranmer opened this issue Dec 17, 2023 · 8 comments
Labels

Comments

@MilesCranmer
Copy link

This is breaking downstream compatibility with older Julia versions: if I install RecursiveArrayTools in a fresh environment:

julia +1.6 --startup-file=no -e 'using Pkg; pkg"activate --temp"; pkg"add RecursiveArrayTools"; pkg"precompile"'

I get this error:

Precompiling project...
  ✗ RecursiveArrayTools
  0 dependencies successfully precompiled in 2 seconds (16 already precompiled)
  1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
Precompiling project...
  ✗ RecursiveArrayTools
  0 dependencies successfully precompiled in 1 seconds (16 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd]

Failed to precompile RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd] to /Users/mcranmer/.julia/compiled/v1.6/RecursiveArrayTools/jl_RqK3gX.
ERROR: LoadError: LoadError: LoadError: invalid usage of @deprecate
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] var"@deprecate"(__source__::LineNumberNode, __module__::Module, old::Any, new::Any, ex::Any)
    @ Base ./deprecated.jl:62
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:384
  [4] include(x::String)
    @ RecursiveArrayTools ~/.julia/packages/RecursiveArrayTools/1yY5f/src/RecursiveArrayTools.jl:5
  [5] top-level scope
    @ ~/.julia/packages/RecursiveArrayTools/1yY5f/src/RecursiveArrayTools.jl:20
  [6] include
    @ ./Base.jl:384 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1235
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:360 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [11] top-level scope
    @ none:1
in expression starting at /Users/mcranmer/.julia/packages/RecursiveArrayTools/1yY5f/src/vector_of_array.jl:224
in expression starting at /Users/mcranmer/.julia/packages/RecursiveArrayTools/1yY5f/src/vector_of_array.jl:224
in expression starting at /Users/mcranmer/.julia/packages/RecursiveArrayTools/1yY5f/src/RecursiveArrayTools.jl:2
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1265
 [3] precompile
   @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:921 [inlined]
 [4] #precompile#196
   @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919 [inlined]
 [5] precompile()
   @ Pkg.API /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919
 [6] do_cmd!(command::Pkg.REPLMode.Command, repl::Pkg.REPLMode.MiniREPL)
   @ Pkg.REPLMode /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:405
 [7] do_cmd(repl::Pkg.REPLMode.MiniREPL, input::String; do_rethrow::Bool)
   @ Pkg.REPLMode /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/REPLMode/REPLMode.jl:386
 [8] top-level scope
   @ none:1
@MilesCranmer
Copy link
Author

@ChrisRackauckas @AayushSabharwal sorry to bother you about this but this error is currently breaking tons of downstream packages on older Julia versions – it's impossible to install any package that indirectly depends on RecursiveArrayTools.jl unless you force install an earlier version.

If the idea is to not support Julia 1.6 could this be set this in the Project.toml? Currently it says 1.6 so all older Julia versions are getting hit by it.

I think maybe the reason this wasn't noticed is that the CI has a blind spot and isn't actually testing older Julia:

https://github.com/SciML/RecursiveArrayTools.jl/actions/runs/7177904059/job/19545138534#step:6:22

[ Warning: julia version requirement for project not satisfied
julia version requirement for package `DiffEqBase [2b5f629d]` not satisfied
[ Warning: julia version requirement for project not satisfied
julia version requirement for package `DiffEqBase [2b5f629d]` not satisfied
[ Warning: julia version requirement for project not satisfied
julia version requirement for package `DiffEqBase [2b5f629d]` not satisfied
[ Warning: julia version requirement for project not satisfied
julia version requirement for package `DiffEqBase [2b5f629d]` not satisfied
┌ Info: Not compatible with this release. No problem.
└   exception = empty intersection between [email protected] and project compatibility 2

which might be why this wasn't caught.

@AayushSabharwal
Copy link
Member

AayushSabharwal commented Dec 18, 2023

Thanks for pointing that out. I think we should bump the julia compat to at least 1.8 in this case, if not 1.9. I'll address this in #298

CI didn't notice this because CI couldn't run until several other packages were tagged. That is the reason for #298 (to rerun CI and weed out issues). 1.6 doesn't resolve there due to incompatibilities with other packages, so it makes sense for this package to update to 1.9 anyway

@MilesCranmer
Copy link
Author

@AayushSabharwal I see. I guess you will need to submit a patch to the Julia registry to recall the earlier version, because 3.0.0 was already registered for 1.6?

@AayushSabharwal
Copy link
Member

I guess so

@MilesCranmer
Copy link
Author

I guess submit a PR on https://github.com/JuliaRegistries/General/blob/e3e462fe3a68fc3c105053e2d45722fb04545634/R/RecursiveArrayTools/Compat.toml#L164-L166

with the diff

  [3]
  Statistics = "1"
  SymbolicIndexingInterface = "0.3"
+ julia = "1.8.0-1"

?

@MilesCranmer
Copy link
Author

Or even 1.9 if you aren't testing on 1.8? (so there aren't other issues)

@ChrisRackauckas
Copy link
Member

with the diff

No, general shouldn't be modified like that. Instead, bump the lower bound to v1.9 and then yank the existing v3's and put a new v3 out there.

@MilesCranmer
Copy link
Author

I see, thanks for the tip. And thanks for quickly addressing this; much appreciated!

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

No branches or pull requests

3 participants