Skip to content

use CheckedSizeProduct.jl for implementing checked_dims#90

Open
nsajko wants to merge 2 commits intoJuliaArrays:mainfrom
nsajko:checked_dims
Open

use CheckedSizeProduct.jl for implementing checked_dims#90
nsajko wants to merge 2 commits intoJuliaArrays:mainfrom
nsajko:checked_dims

Conversation

@nsajko
Copy link
Member

@nsajko nsajko commented Jan 14, 2025

Fixes #89

@nsajko nsajko marked this pull request as draft January 14, 2025 22:34
@nsajko
Copy link
Member Author

nsajko commented Jan 14, 2025

Marked as draft until CheckedSizeProduct.jl gets registered.

@nsajko
Copy link
Member Author

nsajko commented Jan 17, 2025

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
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.78%. Comparing base (1c6d546) to head (f9f7563).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nsajko
Copy link
Member Author

nsajko commented Feb 21, 2026

CheckedSizeProduct is now simplified and optimized and waiting in the process of registration.

@nsajko nsajko marked this pull request as ready for review February 23, 2026 14:56
Comment on lines +192 to +197
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))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the error message include a reference to the input dimensions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the commit pushed just now, yes.

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.

move the checked_dims implementation to a dependency package?

2 participants