refactor: switch from Knetic/govaluate to projectdiscovery fork (#7380)#7381
Closed
ChrisJr404 wants to merge 1 commit into
Closed
refactor: switch from Knetic/govaluate to projectdiscovery fork (#7380)#7381ChrisJr404 wants to merge 1 commit into
ChrisJr404 wants to merge 1 commit into
Conversation
Closes projectdiscovery#7380. github.com/Knetic/govaluate has been archived. Switch all import paths in the source tree and go.mod to the maintained fork at github.com/projectdiscovery/govaluate (bug fixes + perf improvements including the nuclei#5580 quote-string parsing already cited in the issue). The temporary go.mod replace pointing at github.com/ChrisJr404/dsl is there because projectdiscovery/dsl still exposes Knetic types in its public API — without that update, go modules can't satisfy two different module paths from the same source. The companion PR projectdiscovery/dsl#305 lands the matching swap on the dsl side. Once dsl#305 is merged and tagged, the replace can come out and the dsl version bumped.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Member
|
Thanks for the PR! Superseded by #7414 |
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 #7380.
Summary
github.com/Knetic/govaluateis archived. Switch to the maintained fork atgithub.com/projectdiscovery/govaluate(bug fixes + perf improvements, including the nuclei#5580 quote-string parsing called out in the issue). All 17 source files swapped, plus go.mod/go.sum.Why this is a draft
projectdiscovery/dslstill re-exports Knetic/govaluate types in its public API (HelperFunctions() map[string]Knetic/govaluate.ExpressionFunction). Without the matching swap on the dsl side, this PR fails to build with:go modules can't satisfy two different module paths from the same source, so the dsl swap has to land first.
Companion PR: projectdiscovery/dsl#305 — same refactor, no public-API shape change.
Current state of this PR
github.com/projectdiscovery/dsl => github.com/ChrisJr404/dsl <hash>pinned at the dsl#305 commit so this PR builds green for review. This needs to come out before merge — once dsl#305 is tagged, bump the projectdiscovery/dsl version in the require block and drop the replace.Tests
go test ./pkg/operators/... ./pkg/protocols/common/... ./pkg/templates/... — all packages pass (matchers, extractors, dsl, variables, expressions, templates).
Path to merge
Happy to do step 3 once the dsl PR is in.