Skip to content

Comments

More robust constructors#18

Merged
jakobnissen merged 1 commit intomasterfrom
noref
Apr 7, 2025
Merged

More robust constructors#18
jakobnissen merged 1 commit intomasterfrom
noref

Conversation

@jakobnissen
Copy link
Member

  • Use cconvert instead of accessing the internal .ref field of Array. This is still not entirely stable API, but hopefully better
  • Do not use inbounds for substring of AbstractString, because the implementor of the AbstractString may lie about the codeunits, and I'm not confident the substring constructor will detect it
  • Use ncodeunits instead of reading the ncodeunit fields of substrings
  • Be slightly more conservative in what subarrays the constructor accepts.

The subarray changes are technically breaking, but since the previous behaviour was buggy, AND the bug would throw an internal error, AND it's unlikely anyone relied on it, I'll add it in a minor release

* Use cconvert instead of accessing the internal .ref field of Array. This is
  still not entirely stable API, but hopefully better
* Do not use inbounds for substring of AbstractString, because the implementor
  of the AbstractString may lie about the codeunits, and I'm not confident
  the substring constructor will detect it
* Use ncodeunits instead of reading the ncodeunit fields of substrings
* Be slightly more conservative in what subarrays the constructor accepts.
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.82%. Comparing base (0a56a55) to head (2412aae).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   96.83%   96.82%   -0.02%     
==========================================
  Files           5        5              
  Lines         253      252       -1     
==========================================
- Hits          245      244       -1     
  Misses          8        8              
Flag Coverage Δ
unittests 96.82% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jakobnissen jakobnissen merged commit 8946f1f into master Apr 7, 2025
12 checks passed
@jakobnissen jakobnissen deleted the noref branch April 7, 2025 13:09
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.

1 participant