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 type inference failure in norm on structural matrix #816

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oxinabox
Copy link
Member

This fixes the 1.11 failures on CI.

Not sure its the best way,
but it basically boils down to

Julia 1.11 introduced a minor regression in inference of: zero.(Diagonal(Float64[;])) .* 0.0)
This used to infer to Diagonal{Float64} now it infers to Union(Diagonal{Float64}, Matrix{Float64})
Similar to others.

Not sure this is exactly the cleanest or best way but this does fix it.

We also could change it not to test this.
But small type inference failures do easily grow into big ones -- union splitting isn't a silver bullet.


I am not stepping up to primary maintainer duties,
I am just on leave and thought i would check something and I saw CI was broken.
hopefully someone can review this

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@oxinabox
Copy link
Member Author

Apparently this inference failure doesn't happen in julia 1.11 without anything loaded, so it is caused by World Splitting somewhere

@oxinabox
Copy link
Member Author

oxinabox commented Jan 1, 2025

CI still fails because of a failure with sortslices, but the norm problem is gone

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.

1 participant