use CheckedSizeProduct.jl for implementing checked_dims#90
use CheckedSizeProduct.jl for implementing checked_dims#90nsajko wants to merge 2 commits intoJuliaArrays:mainfrom
Conversation
|
Marked as draft until CheckedSizeProduct.jl gets registered. |
|
I'm content with CheckedSizeProduct now. Does anyone have any comments on it before registration? FYI I'll also make a similar draft PR, on the PtrArrays repo. StaticArraysCore seems like another possible user. |
* Depend on the CheckedSizeProduct.jl package to allow the code to be reused across the ecosystem. * Less precise error message for the thrown `ArgumentError` exception. * Less precise line number information for the thrown `ArgumentError` exception. Fixes JuliaArrays#89
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #90 +/- ##
==========================================
- Coverage 93.18% 92.78% -0.40%
==========================================
Files 5 5
Lines 220 208 -12
==========================================
- Hits 205 193 -12
Misses 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
CheckedSizeProduct is now simplified and optimized and waiting in the process of registration. |
src/FixedSizeArray.jl
Outdated
| msg = """ | ||
| invalid array dimensions, check if: | ||
| * any dim is negative | ||
| * any dim is `typemax(T)` | ||
| * trying to compute the total length overflows""" | ||
| throw(ArgumentError(msg)) |
There was a problem hiding this comment.
Would the error message include a reference to the input dimensions?
There was a problem hiding this comment.
After the commit pushed just now, yes.
Fixes #89