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

ConstructionBaseExtras.jl collides with ConstructionBase.jl's staticarrays extension on Julia 1.9 #52

Closed
thomvet opened this issue Mar 9, 2023 · 2 comments

Comments

@thomvet
Copy link
Contributor

thomvet commented Mar 9, 2023

It's not disastrous, but the following currently happens on Julia 1.9:

WARNING: Method definition constructorof(Type{var"#s1"} where var"#s1"<:(StaticArraysCore.SArray{Tuple{S}, T, 1, S} where T where S)) in module StaticArraysExt at C:\Users\XXX\.julia\packages\ConstructionBase\VB0co\ext\StaticArraysExt.jl:12 overwritten in module ConstructionBaseExtras at C:\Users\XXX\.julia\packages\ConstructionBaseExtras\cy4E1\src\staticarrays.jl:8.
  ** incremental compilation may be fatally broken for this module **

and a few other warnings like that; all caused by the same underlying issue as far as I can tell.

It's caused by having loaded StaticArrays.jl, which triggers the corresponding extension in ConstructionBase.jl, then ModelParameters.jl loads ConstructionBaseExtras.jl, which overwrites the method already defined by the extension in ConstructionBase.jl.

I can give it a try to fix this, but if someone else is already on it, then I'll just wait of course. I would probably have to rely on Requires.jl to make things compatible for Julia versions <1.9, though?

@rafaqz, would that be fine with you?

@rafaqz
Copy link
Owner

rafaqz commented Mar 9, 2023

ConstructionBaseExtras.jl was a stopgap to make StaticArrays.jl work until we got weak dependencies, which land in 1.9. So it will be archived. It's not really a necessary dependency here, just stops one of the main sources of errors.

So we can just stop depending on it, and everything will keep working on 1.9. On 1.6-1.8 people will have to load it manually.

So you can just delete the ConstructionBaseExtras.jl dep completely, if you want to PR. No Requires.jl needed.

@thomvet
Copy link
Contributor Author

thomvet commented Mar 9, 2023

You are right, that's probably more elegant long term. I'll make a PR, also adding a note to the readme.

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