Skip to content

Add support for patterns that accept empty data#298

Merged
ddaspit merged 1 commit intomasterfrom
accepts-empty
Apr 29, 2025
Merged

Add support for patterns that accept empty data#298
ddaspit merged 1 commit intomasterfrom
accepts-empty

Conversation

@ddaspit
Copy link
Copy Markdown
Contributor

@ddaspit ddaspit commented Mar 20, 2025

This change is Reviewable

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.52%. Comparing base (29246ef) to head (0bd5aca).

Files with missing lines Patch % Lines
.../FiniteState/NondeterministicFstTraversalMethod.cs 0.00% 1 Missing ⚠️
src/SIL.Machine/FiniteState/TraversalMethodBase.cs 97.43% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #298      +/-   ##
==========================================
+ Coverage   70.46%   70.52%   +0.05%     
==========================================
  Files         386      386              
  Lines       32260    32299      +39     
  Branches     4539     4543       +4     
==========================================
+ Hits        22733    22779      +46     
+ Misses       8479     8472       -7     
  Partials     1048     1048              

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

@johnml1135
Copy link
Copy Markdown
Collaborator

@ddaspit - having a meaningful review would be fairly challenging without understanding the ins and outs of the finite state machine. Here are two things that I would like:

  • An affirmation that the tests fail before the changes made
  • An issue opened up (and linked to the pull request) that describes why this is an issue now (how it came up) and more exactly what capability is being added.

With the affirmation and new issue (even if I don't understand it), I will be happy to approve the pull request.

@jtmaxwell3
Copy link
Copy Markdown
Collaborator

@johnml1135:
This pull request fixes https://jira.sil.org/browse/LT-21867.
The root cause of LT-21867 was the inability of FSTs to accept the empty string.
I proposed a superficial fix in #296.
Damien preferred to fix the root problem in this pull request.
The modified test in RewriteRuleTests.cs fails without one of these changes (the modification should be a NOOP, but the test fails without one of the fixes).

@ddaspit
Copy link
Copy Markdown
Contributor Author

ddaspit commented Mar 21, 2025

@jtmaxwell3 Thanks for providing the full context.

@jtmaxwell3
Copy link
Copy Markdown
Collaborator

@ddaspit I tested this pull request against https://jira.sil.org/browse/LT-21867, and it fixes the problem.

@Enkidu93
Copy link
Copy Markdown
Collaborator

Do you just need someone to approve this, @ddaspit?

@ddaspit
Copy link
Copy Markdown
Contributor Author

ddaspit commented Apr 28, 2025

Yes, this hasn't been merged, because it hasn't been reviewed. And, to be honest, I forgot about it.

@Enkidu93
Copy link
Copy Markdown
Collaborator

Yes, this hasn't been merged, because it hasn't been reviewed. And, to be honest, I forgot about it.

Who should review it? I wasn't sure if @jtmaxwell3's admission that it fixes the issue was sufficient.

Copy link
Copy Markdown
Contributor Author

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

That is probably sufficient. It would be helpful for you to do at least a cursory review for any obvious issues.

Reviewable status: 0 of 11 files reviewed, all discussions resolved

Copy link
Copy Markdown
Collaborator

@Enkidu93 Enkidu93 left a comment

Choose a reason for hiding this comment

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

Nothing jumps out at me :lgtm:

Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ddaspit)

@ddaspit ddaspit force-pushed the accepts-empty branch 2 times, most recently from cb49ff2 to a680a38 Compare April 29, 2025 16:40
@ddaspit ddaspit merged commit 58098ed into master Apr 29, 2025
3 of 4 checks passed
@ddaspit ddaspit deleted the accepts-empty branch April 29, 2025 16:59
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.

5 participants