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

release-1.10: bump SparseArrays to latest v1.10 #56543

Closed
wants to merge 3 commits into from

Conversation

KristofferC
Copy link
Member

No description provided.

@KristofferC
Copy link
Member Author

@gbaraldi, @ViralBShah, @wsmoses, seems like this changed what error is thrown (SparseArrays does type piracy).


Test Failed at /cache/build/tester-demeter6-8/julialang/julia-release-1-dot-10/julia-4612e1ec04/share/julia/test/abstractarray.jl:1343
--
  | Expression: [t...; 3 4 5]
  | Expected: ArgumentError
  | Thrown: DimensionMismatch

@wsmoses
Copy link
Contributor

wsmoses commented Nov 13, 2024

I have no idea why that would change, but looking at the test, if anything that error feels more consistent?

from https://github.com/JuliaLang/julia/blob/9ee861f2806319e3575afe676d563d2a7a0bd8e2/test/abstractarray.jl#L1339C1-L1349C1

@testset "splatting into hvcat" begin
    t = (1, 2)
    @test [t...; 3 4] == [1 2; 3 4]
    @test [0 t...; t... 0] == [0 1 2; 1 2 0]
    @test_throws ArgumentError [t...; 3 4 5]

    @test Int[t...; 3 4] == [1 2; 3 4]
    @test Int[0 t...; t... 0] == [0 1 2; 1 2 0]
    @test_throws DimensionMismatch Int[t...; 3 4 5]
end

@wsmoses
Copy link
Contributor

wsmoses commented Nov 13, 2024

per 8fd5f27 which made the second case return DimensionMismatch I suppose the change might have made things more stable and/or now return a better error?

cc @vtjnash

@wsmoses
Copy link
Contributor

wsmoses commented Nov 13, 2024

lmao wat


Error in testset abstractarray:
--
  | Test Failed at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XC9YQX9HH2.0/build/default-honeycrisp-XC9YQX9HH2-0/julialang/julia-release-1-dot-10/julia-0fd4c3c042/share/julia/test/abstractarray.jl:1343
  | Expression: [t...; 3 4 5]
  | Expected: DimensionMismatch
  | Thrown: ArgumentError

@KristofferC
Copy link
Member Author

It depends on if SparseArrays have been loaded or not into the worker because SparseArrays does type piracy on xcat (#56543 (comment)).

So the error thrown has to be consistent between Base and SparseArrays.

@wsmoses wsmoses mentioned this pull request Nov 29, 2024
@wsmoses
Copy link
Contributor

wsmoses commented Nov 29, 2024

okay one error path is:


From worker 12:	ERROR: DimensionMismatch: row 2 has mismatched number of columns (expected 2, got 3)
--
  | From worker 12:	Stacktrace:
  | From worker 12:	  [1] typed_hvcat(::Type{Int64}, ::Tuple{Int64, Int64}, ::Int64, ::Vararg{Int64})
  | From worker 12:	    @ Base ./abstractarray.jl:2165
  | From worker 12:	  [2] hvcat_internal(::Tuple{Int64, Int64}, ::Int64, ::Int64, ::Vararg{Int64})
  | From worker 12:	    @ SparseArrays /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1246
  | From worker 12:	  [3] hvcat(::Tuple{Int64, Int64}, ::Int64, ::Int64, ::Vararg{Int64})
  | From worker 12:	    @ SparseArrays /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1273
  | From worker 12:	  [4] hvcat_rows(::Tuple{Int64, Int64}, ::Vararg{Tuple})
  | From worker 12:	    @ Base ./abstractarray.jl:2019
  | From worker 12:	  [5] macro expansion
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/abstractarray.jl:1344 [inlined]
  | From worker 12:	  [6] macro expansion
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
  | From worker 12:	  [7] top-level scope
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/abstractarray.jl:1340
  | From worker 12:	  [8] include
  | From worker 12:	    @ ./Base.jl:495 [inlined]
  | From worker 12:	  [9] macro expansion
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/testdefs.jl:30 [inlined]
  | From worker 12:	 [10] macro expansion
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
  | From worker 12:	 [11] macro expansion
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/testdefs.jl:23 [inlined]
  | From worker 12:	 [12] macro expansion
  | From worker 12:	    @ ./timing.jl:503 [inlined]
  | From worker 12:	 [13] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
  | From worker 12:	    @ Main /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/testdefs.jl:21
  | From worker 12:	 [14] runtests
  | From worker 12:	    @ /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/test/testdefs.jl:5 [inlined]
  | From worker 12:	 [15] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{seed::UInt128})
  | From worker 12:	    @ Base ./essentials.jl:894
  | From worker 12:	 [16] (::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}})()
  | From worker 12:	    @ Distributed /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:287
  | From worker 12:	 [17] run_work_thunk(thunk::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
  | From worker 12:	    @ Distributed /cache/build/tester-amdci5-11/julialang/julia-release-1-dot-10/julia-d01a599de1/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:70
  | From worker 12:	 [18] (::Distributed.var"#109#111"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()

The other error is

      From worker 33:   ERROR: ArgumentError: argument count does not match specified shape (expected 4, got 5)
      From worker 33:   Stacktrace:
      From worker 33:     [1] hvcat(::Tuple{Int64, Int64}, ::Int64, ::Vararg{Int64})
      From worker 33:       @ Base ./abstractarray.jl:2124
      From worker 33:     [2] hvcat_rows(::Tuple{Int64, Int64}, ::Vararg{Tuple})
      From worker 33:       @ Base ./abstractarray.jl:2019
      From worker 33:     [3] macro expansion
      From worker 33:       @ ~/git/julia/test/abstractarray.jl:1344 [inlined]
      From worker 33:     [4] macro expansion
      From worker 33:       @ ~/git/julia/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
      From worker 33:     [5] top-level scope
      From worker 33:       @ ~/git/julia/test/abstractarray.jl:1340
      From worker 33:     [6] include
      From worker 33:       @ ./Base.jl:495 [inlined]
      From worker 33:     [7] macro expansion
      From worker 33:       @ ~/git/julia/test/testdefs.jl:30 [inlined]
      From worker 33:     [8] macro expansion
      From worker 33:       @ ~/git/julia/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
      From worker 33:     [9] macro expansion
      From worker 33:       @ ~/git/julia/test/testdefs.jl:23 [inlined]
      From worker 33:    [10] macro expansion
      From worker 33:       @ ./timing.jl:503 [inlined]
      From worker 33:    [11] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      From worker 33:       @ Main ~/git/julia/test/testdefs.jl:21
      From worker 33:    [12] runtests
      From worker 33:       @ ~/git/julia/test/testdefs.jl:5 [inlined]
      From worker 33:    [13] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{seed::UInt128})
      From worker 33:       @ Base ./essentials.jl:894
      From worker 33:    [14] (::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}})()
      From worker 33:       @ Distributed ~/git/julia/usr/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:287
      From worker 33:    [15] run_work_thunk(thunk::Distributed.var"#110#112"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      From worker 33:       @ Distributed ~/git/julia/usr/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:70
      From worker 33:    [16] (::Distributed.var"#109#111"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()

To me this is a bug, why should typed_hvcat throw a different error from hvcat for the same issue?

@wsmoses
Copy link
Contributor

wsmoses commented Nov 29, 2024

okay @KristofferC I think JuliaSparse/SparseArrays.jl#588 ought to do it but I'm a bit unclear on how to set up the end to end testing here

@wsmoses
Copy link
Contributor

wsmoses commented Dec 1, 2024

Okay I think that error type we changed in this PR now should be restored to the base Julia version.

id update it but I don’t have permissions

@KristofferC
Copy link
Member Author

Added to #56653.

@KristofferC KristofferC closed this Dec 1, 2024
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.

4 participants