Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor, Enhance: Condition parsing/resolving. #162

Merged
merged 1 commit into from
May 31, 2024

Conversation

Jeffset
Copy link
Contributor

@Jeffset Jeffset commented May 29, 2024

This CL fully separates parsing from validation,
as per the initial design:

Any `MayBeInvalid` model works on the best effort basis,
performing no additional checks at construction/usage time.
Thus, if the model is in fact invalid, the behavior is undefined.
All thorough checks are performed only at validation

This CL changes no behavior on the good path.
In case of condition parsing/resolution errors, some errors/warnings could be hidden by others before this CL. Now all of them should be reported correctly.

This CL fully separates parsing from validation,
as per the initial design:
```
Any `MayBeInvalid` model works on the best effort basis,
performing no additional checks at construction/usage time.
Thus, if the model is in fact invalid, the behavior is undefined.
All thorough checks are performed only at validation
```
This CL changes no behavior on the good path.
In case of condition parsing/resolution errors, some errors/warnings
could be hidden by others before this CL. Now all of them should
be reported correctly.
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 83.80%. Comparing base (4b82b9d) to head (e054017).
Report is 1 commits behind head on main.

Files Patch % Lines
...ndex/yatagan/core/model/impl/ConditionModelImpl.kt 88.46% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #162      +/-   ##
============================================
- Coverage     83.86%   83.80%   -0.07%     
- Complexity     1598     1607       +9     
============================================
  Files           197      197              
  Lines          7681     7650      -31     
  Branches       1448     1444       -4     
============================================
- Hits           6442     6411      -31     
+ Misses          729      727       -2     
- Partials        510      512       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jeffset Jeffset marked this pull request as ready for review May 29, 2024 16:56
@Jeffset Jeffset requested a review from bacecek May 29, 2024 16:56
@Jeffset Jeffset merged commit 7672b52 into main May 31, 2024
4 checks passed
@Jeffset Jeffset deleted the wp/improve-condition-resolution branch May 31, 2024 04:46
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.

None yet

2 participants