Skip to content

Use _return_type from Base, not from Core.Compiler#819

Merged
mcabbott merged 3 commits intoJuliaDiff:mainfrom
serenity4:return-type-fix
Feb 25, 2025
Merged

Use _return_type from Base, not from Core.Compiler#819
mcabbott merged 3 commits intoJuliaDiff:mainfrom
serenity4:return-type-fix

Conversation

@serenity4
Copy link
Copy Markdown
Member

Starting from JuliaLang/julia#56409, we no longer have Base._return_type === Core.Compiler._return_type, and therefore Core.Compiler._return_type calls the wrong function on nightly, triggering an error. This PR should ensure a more stable access to this binding.

These used to be the same, but no longer are
@mcabbott
Copy link
Copy Markdown
Member

Similar changes in FluxML/NNlib.jl#618 used Core.Compiler.return_type instead of Base._return_type. Do you know which is better?

@serenity4
Copy link
Copy Markdown
Member Author

I think they are equivalent (at least they are in 1.11 and nightly), we can go with Core.Compiler.return_type as it reads slightly more stable without an underscore.

@serenity4
Copy link
Copy Markdown
Member Author

I believe test failures are unrelated, if happy with the change feel free to merge, and it'd be fantastic if a new version could be tagged as well.

@mcabbott mcabbott merged commit 150c7a1 into JuliaDiff:main Feb 25, 2025
5 of 9 checks passed
@mcabbott
Copy link
Copy Markdown
Member

Thanks! Will tag it now.

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.

2 participants