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

Fix deprecated Vararg expression #1000

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

devmotion
Copy link
Contributor

@devmotion devmotion commented Mar 25, 2025

#992 and thereby release 1.8.0 broke MLJBase:

ERROR: LoadError: Wrapping `Vararg` directly in UnionAll is deprecated (wrap the tuple instead).
You may need to write `f(x::Vararg{T})` rather than `f(x::Vararg{<:T})` or `f(x::Vararg{T}) where T` instead of `f(x::Vararg{T} where T)`.
Stacktrace:
 [1] UnionAll(v::Any, t::Any)
   @ Core ./boot.jl:299
 [2] top-level scope
   @ ~/.julia/packages/MLJBase/5aKTB/src/interface/data_utils.jl:133
 [3] include(mod::Module, _path::String)
   @ Base ./Base.jl:557
 [4] include(x::String)
   @ MLJBase ~/.julia/packages/MLJBase/5aKTB/src/MLJBase.jl:1
 [5] top-level scope
   @ ~/.julia/packages/MLJBase/5aKTB/src/MLJBase.jl:149
 [6] include
   @ ./Base.jl:557 [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, UInt128}}, source::String)
   @ Base ./loading.jl:2881
 [8] top-level scope
   @ stdin:6
in expression starting at /build/.julia/packages/MLJBase/5aKTB/src/interface/data_utils.jl:133
in expression starting at /build/.julia/packages/MLJBase/5aKTB/src/MLJBase.jl:1
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile MLJBase [a7f614a8-145f-11e9-1d2a-a57a1082229d] to "/build/.julia/compiled/v1.11/MLJBase/jl_KDRdpO".
...

This PR fixes the deprecated Vararg expression introduced in #992. This error actually showed up in the CI of #992, e.g. https://github.com/JuliaAI/MLJBase.jl/actions/runs/14047109795/job/39330222537#step:6:402, but since CI was not run with --depwarn=error they did not lead to a test failure but only a warning in the logs. In this PR, however, no such warnings show up in the CI logs.

Copy link
Member

@ablaom ablaom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the prompt detection and resolution.

@ablaom ablaom merged commit b7d47a7 into JuliaAI:dev Mar 25, 2025
3 checks passed
@ablaom ablaom mentioned this pull request Mar 25, 2025
@devmotion devmotion deleted the dw/fix_vararg branch March 25, 2025 11:00
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

Successfully merging this pull request may close these issues.

3 participants