-
Notifications
You must be signed in to change notification settings - Fork 19
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
Drop Requires, depend on StaticArraysCore #60
Conversation
Great I would love to get rid of Requires. The CI fails are StaticArrays related. Do the tests pass locally for you? Does it depend on the StaticArrays version? |
Failing for me too. Not sure why, could be a StaticArrays version thing |
Locally on |
StaticArraysCore requires Julia v1.6, as does StaticArrays itself now. Accessors currently still accepts Julia v1.3. I think that's why the tests are failing. Increasing the minimum Julia version to v1.6 in Accessors shouldn't be a problem though, right? |
Co-authored-by: Oliver Schulz <[email protected]>
My local tests are still failing on Julia 1.8. Do we need to constrain versions in the test environment? I think that can be done by putting another |
I just did literally the same Pull Request on Setfield.jl (jw3126/Setfield.jl#174) where tests pass locally (let's see what happens on CI). If it works there, maybe it helps someone with more insight into the differences between the packages to identify the cause here? |
As I said in a comment above, you just removed |
Also, just curious: is there an actual simple example of Requires making a package load noticeably slower, when only a few lines are within |
Requires blocks can invalidate code in other packages, and being at the bottom of a package stack that adds up. Its really which lines, not how many lines, that matters. (I'm think the Setfield.jl requires block used to show in the DynamicGrids.jl flamegraph when I was optimising load time, but just a vague memory) |
I don't see any earlier comments from you, but this is a great point. Now the problem is these lines: @inline delete(obj::StaticArraysCore.SVector, l::IndexLens) = StaticArraysCore.deleteat(obj, only(l.indices))
@inline insert(obj::StaticArraysCore.SVector, l::IndexLens, val) = StaticArraysCore.insert(obj, only(l.indices), val)
|
Yes, we could ask for that - maybe make PRs to StaticArrays and -Core directly. Just declaring the functions in StaticArraysCore would be non-controversial (I would hope). |
As for Requires overhead: so, unfortunately no simple example anywhere? |
Seems to be the case:
When you add a comment, you can either add it as a one-off or start a review. You must have done the latter. Then you need to click to submit. There should be a button at the top right, "Complete review" or "submit review" or something.
If you do Before:
After:
|
StaticArraysCore going to be deprecated soon: JuliaArrays/StaticArraysCore.jl#15. The period of relevancy of So I guess no point in pursuing this further. See #78 for 1.9+ solution. |
I close this in favor of #78 Feel free to reopen, if I miss something. |
Because of method invalidations, Requires.jl can cause package load times to be much longer. Accessors currently uses Requires for StaticArrays.jl, which is fairly heavy-weight. But that package has recently been refactored to add a StaticArraysCore.jl, which is very light.
This little PR drops use of Requires in favor of a dependency on StaticArraysCore.