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

Exception thrown during report_package on v1.11.1 #668

Closed
rgivry opened this issue Oct 17, 2024 · 4 comments
Closed

Exception thrown during report_package on v1.11.1 #668

rgivry opened this issue Oct 17, 2024 · 4 comments

Comments

@rgivry
Copy link

rgivry commented Oct 17, 2024

When running report_package on a project of mine I run into this error being thrown:

ERROR: TypeError: in typeassert, expected DataType, got Type{Tuple{Type{StaticArraysCore.SizedArray{Tuple{3}, T, 1, 1, Vector{T}}}, Tuple{Tuple{Any, Any, Any}}} where T}

I'm not sure how to dig deeper into this issue to produce a an minimal working example, I've enabled additional logging. If there is additionnal instrumentation or analysis that can be done I'm happy to dig a bit deeper into this issue.

Analysis

Running the same workload against two different julia versions shows this is a regression due to a julia version upgrade. Both tests are run against [email protected].

v1.11.0

$ julia +1.11.0 --project -e "using $MY_PACKAGE_NAME, JET; JET.report_package($MY_PACKAGE_NAME, target_defined_modules=true)"
// [...]
[toplevel-info] analyzed 1076 top-level definitions (took 29.837 sec)

v1.11.1

$ julia +1.11.1 --project -e "using $MY_PACKAGE_NAME, JET; JET.report_package($MY_PACKAGE_NAME, target_defined_modules=true)"
// [...]
[toplevel-info] analyzing from top-level definitions (33/1076)ERROR: TypeError: in typeassert, expected DataType, got Type{Tuple{Type{StaticArraysCore.SizedArray{Tuple{3}, T, 1, 1, Vector{T}}}, Tuple{Tuple{Any, Any, Any}}} where T}
Stacktrace:
   [1] get_sig
     @ ~/.julia/packages/JET/HF3pG/src/abstractinterpret/inferenceerrorreport.jl:101 [inlined]
   [2] InferenceErrorReport
     @ ~/.julia/packages/JET/HF3pG/src/abstractinterpret/inferenceerrorreport.jl:576 [inlined]
   [3] (::JET.BasicPass)(::Type{JET.GeneratorErrorReport}, analyzer::JET.JETAnalyzer{JET.DefinitionAnalysisPass}, result::Core.Compiler.InferenceResult)
     @ JET ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:457
   [4] DefinitionAnalysisPass
     @ ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:159 [inlined]
   [5] InferenceState
     @ ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:186 [inlined]
// [...]
 [173] report_package(args::Module; ignore_missing_comparison::Bool, jetconfigs::@Kwargs{target_defined_modules::Bool})
     @ JET ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:1653

caused by: Dimension mismatch
Stacktrace:
   [1] error(s::String)
     @ Base ./error.jl:35
   [2] #s26#36
     @ ~/.julia/packages/StaticArrays/MSJcA/src/SizedArray.jl:38 [inlined]
   [3] var"#s26#36"(S::Any, T::Any, N::Any, M::Any, TData::Any, L::Any, ::Any, x::Any)
     @ StaticArrays ./none:0
   [4] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
     @ Core ./boot.jl:707
   [5] (::JET.BasicPass)(::Type{JET.GeneratorErrorReport}, analyzer::JET.JETAnalyzer{JET.DefinitionAnalysisPass}, result::Core.Compiler.InferenceResult)
     @ JET ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:451
   [6] DefinitionAnalysisPass
     @ ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:159 [inlined]
// [...]
 [175] report_package(args::Module; ignore_missing_comparison::Bool, jetconfigs::@Kwargs{target_defined_modules::Bool})
     @ JET ~/.julia/packages/JET/HF3pG/src/analyzers/jetanalyzer.jl:1653
@aviatesk
Copy link
Owner

Which package are you analyzing?

@rgivry
Copy link
Author

rgivry commented Oct 17, 2024

A private project, I can't share the code for it. It's also pretty large so it's not clear to me where things are going wrong. If you have some ideas on how I can narrow down the problem I'm happy to go and create a representative example.

@aviatesk
Copy link
Owner

Could you give a try to v0.9.11?

@rgivry
Copy link
Author

rgivry commented Oct 17, 2024

It works, thanks for fixing this.

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

2 participants