-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Type piracy on Base
fails incremental sysimage builds (1.9 -> 1.10 regression)
#924
Comments
It looks like the issue is not type piracy but method overwriting? |
Yes, but technically type piracy is the only(?) way to achieve this I'm glad it's validating this and it's throwing warnings/errors, although it would be nice to somehow opt out of errors for this use case. Currently the only workaround for this is to remove any type piracy on Base from the base sysimage layer, which turns out to be a difficult thing to do (not impossible though) There's piracy in many major packages like:
Also Compat.jl is a type piracy factory when used in some Julia version / Compat.jl version configurations |
We also ran into this as we previously used method overwriting as an ugly hack to workaround the problem described here: #743 (comment) In Julia versions 1.9 and earlier, during sysimg compilation we were able to overwrite |
JuliaLang/julia#50578 for reference when this was introduced. |
Let's assume you have two different packages that do the same type piracy on
Base
.For example
Base.any(a::Float64) = "a"
(as in the attached example)While unlikely in standard situations it can happen when you artifically modify the UUID on one package to effectively have two versions of the same package in separate sysimage layers.
A simple example could be that you have DataFrames.jl in the base layer with OrderedCollections.jl (which has type piracy) and then in the next layer you add a different package that also depends on OrderedCollections.jl.
Note that in this example you swap the uuids of DataFrames.jl and OrderedCollections in the base layer to allow adding any packags in the next layer without any conflicts.
This used to work in 1.9, but now in 1.10 it doesn't.
Example (also everything attached in a zip below)
sysimage_issue.zip
Package A
Package B
Script
Runs
1.9
1.10
The text was updated successfully, but these errors were encountered: