8000 validation: fix incorrect validation order w/ composition for array elements + panic on duplicate path by System-Glitch · Pull Request #259 · go-goyave/goyave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

validation: fix incorrect validation order w/ composition for array elements + panic on duplicate path #259

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

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

System-Glitch
Copy link
Member
@System-Glitch System-Glitch commented Apr 3, 2025

References

Issue(s):

Description

Possible drawbacks

  • More allocations per RuleSet. Memory usage slightly increased. Execution speed is very slightly slower but expected to be faster for large rule sets because the complexity of AsRules() has been reduced. Overall, the impact is acceptable.
  • Existing code in projects using previous versions of Goyave may panic now. I don't consider it a breaking change since this behavior has always been buggy and never fully assumed to be a valid use-case.

@System-Glitch System-Glitch added the bug Something isn't working label Apr 3, 2025
@System-Glitch System-Glitch self-assigned this Apr 3, 2025
@coveralls
Copy link
coveralls commented Apr 3, 2025

Pull Request Test Coverage Report for Build 14336650383

Details

  • 33 of 33 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 97.506%

Totals Coverage Status
Change from base Build 14335730170: 0.003%
Covered Lines: 6452
Relevant Lines: 6617

💛 - Coveralls

@System-Glitch System-Glitch marked this pull request as ready for review April 3, 2025 14:43
@System-Glitch System-Glitch changed the title validation: fix incorrect validation order w/ composition for array elements validation: fix incorrect validation order w/ composition for array elements + panic on duplicate path Apr 3, 2025
@System-Glitch System-Glitch added this to the v5.6.0 milestone Apr 7, 2025
@System-Glitch System-Glitch force-pushed the bug/validation-order-w-composition branch from 8f929f6 to 457ac3c Compare April 8, 2025 14:43
…lements

- Removed the sort step for RuleSet conversion
- Use a map storing the array parents instead
@System-Glitch System-Glitch force-pushed the bug/validation-order-w-composition branch from 457ac3c to df1ecd7 Compare April 8, 2025 14:49
@System-Glitch System-Glitch merged commit 226eb5e into master Apr 8, 2025
10 checks passed
@System-Glitch System-Glitch deleted the bug/validation-order-w-composition branch April 8, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation: cannot validate the same path twice for array elements Validation: incorrect validation order when using composition for an array element
2 participants
0