Handle empty-interval edge case in find_intersections - #201
Open
haberdashPI wants to merge 9 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #201 +/- ##
==========================================
+ Coverage 84.31% 84.35% +0.03%
==========================================
Files 12 12
Lines 848 850 +2
==========================================
+ Hits 715 717 +2
Misses 133 133 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ericphanson
reviewed
Oct 7, 2022
ericphanson
left a comment
Contributor
There was a problem hiding this comment.
closes #200?
I suggested arranging the dispatches slightly differently there, which I think has some advantages. With this version:
- Empty checks are repeated in two methods
- errors depend on contents, not type: if the array has the wrong type and is empty, no error. Non-empty, and error
omus
reviewed
Oct 17, 2022
omus
reviewed
Oct 17, 2022
|
|
||
| # https://github.com/JuliaLang/julia/issues/33882 | ||
| @test r isa StepRangeLen | ||
| @test r isa (VERSION < v"1.8" ? StepRangeLen : StepRange) |
Collaborator
There was a problem hiding this comment.
Best to make these fixes as separate PRs so they can be merged faster
Collaborator
There was a problem hiding this comment.
After looking into it I think this fix is incorrect. I've made a new fix in #204
Suggested change
| @test r isa (VERSION < v"1.8" ? StepRangeLen : StepRange) | |
| @test r isa StepRangeLen |
Merged
haberdashPI
force-pushed
the
dfl/empty-find-interval
branch
from
October 21, 2022 20:33
ffa9a1a to
375dd59
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #200
Title says it all. This fix also will address some edge cases where
find_intersectionswould throw a StackOverflowError when passed an incorrect type.Small aside: When I ran tests locally there was a failure on 1.8 (had to run on 1.7). Looks to be related to a now closed issue in 1.8.