-
Notifications
You must be signed in to change notification settings - Fork 10
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
Test case fails on julia 1.10 #39
Comments
A similar julia 1.10 test fail is No.37 in same test file.
|
Hi, @NeroBlackstone! I've seen this issue before and I have not been able to pinpoint the root cause. If you do plain conversion, outside of the package, it will work just fine. This behaviour sprung up after 1.10 release. Currently it tries to convert after return (there's a specific syntax for that). I think, the solution would be to switch to explicit conversion within functions before return. |
I find the reason, I think the simplest solution is: elseif (e isa MethodError) || (e isa InexactError) || (e isa ArgumentError) || (e isa ErrorException) I have tested it and all passed, what do you think? |
Have you tried explicit conversions? I think it might take more time but be more sustainable in the long run. Also I'm baffled by the policy. It's not julia 2.0 to break existing error behaviours) |
Also, @gryumov what's your stand on this? Apparently, there's an issue already on the official page. |
“Error types, unless explicitly documented (like DomainError or Base.IOError), are subject to change is the official policy” Looks like they don't think this is a break change.😅 I don’t know if subsequent Julia versions will maintain this behavior. |
Sorry, I don't quite understand what you are describing here. Do you mean to explicitly call the Or define a new |
Okay, I see where the issue is. I'm taking a look. You can comment out these tests if you're actively developing. They don't affect the core functionality. |
Hello everyone! @dmitrii-doronin it might seem strange #40, but we need to deal with multiple dispatch, let's create issues for this: https://github.com/bhftbootcamp/Serde.jl/actions/runs/8912634371/job/24476466918?pr=40 |
In
test/deser.jl
, test case No.30:In julia 1.10, it will fail:
This is because Julia 1.10 throw a different Error in
src/de/deser.jl
:If we test this function:
Julia 1.10 will throw
ERROR: cannot convert a value to missing for assignment
Julia 1.8 will throw
ERROR: MethodError: convert(::Type{Union{}}, ::Int64) is ambiguous. Candidates
And in
src/de/deser.jl
, we are not handlingErrorException
.Question
How do you think it can be improved better? I can open a PR.
The text was updated successfully, but these errors were encountered: