-
Notifications
You must be signed in to change notification settings - Fork 27
Add Go package github.com/theory/jsonpath #153
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
base: master
Are you sure you want to change the base?
Conversation
2664d7c to
c257097
Compare
|
Looks good! Manually merged in 66589d6 It should be clear that the consensus does not respect RFC9535, it only reflects the status quo of (often antiquated) implementations. Hopefully there is a huge overlap, eventually fully converging once more and more implementations follow the still newish spec. So for me it's less a question about the lack of consensus but rather about the behaviour of queries (syntax) not defined within the RFC. Here the consensus might penalise a lenient implementation if the others are strict (e.g. via compile errors) or vice versa. |
|
Ah, if the consensus field is missing (e.g. https://github.com/cburgmer/json-path-comparison/blob/master/regression_suite/regression_suite.yaml#L50), then no consensus was reached and only a certain tendency might be derived (https://cburgmer.github.io/json-path-comparison/#array_slice_with_large_number_for_end_and_negative_step). I believe doing nothing is the only option from that perspective. As for errors, the consensus does track agreement for not supported queries, e.g. https://github.com/cburgmer/json-path-comparison/blob/master/regression_suite/regression_suite.yaml#L50 so I wouldn't skip those in the test, I would check that your implementation doesn't return surprise answers unless intended. Mostly your implementation might actually be returning errors. |
Simplify `compare/compare_test.go` by skipping tests with no consensus, which were the source of the previous unknowns in the test. Based on advice from cburgmer/json-path-comparison#153#issuecomment-3374075044. While at it, upgrade `golangci-lint` to v2.5.0 and tweak its configuration to scan `compare/compare_test.go` and fix the long lines it complains about. Also have the `test-compare` target run the tests verbosely, and run the CI tests on Go 1.25.
Simplify `compare/compare_test.go` by skipping tests with no consensus, which were the source of the previous unknowns in the test. Based on advice from cburgmer/json-path-comparison#153#issuecomment-3374075044. While at it, upgrade `golangci-lint` to v2.5.0 and tweak its configuration to scan `compare/compare_test.go` and fix the long lines it complains about. Also have the `test-compare` target run the tests verbosely.
Simplify `compare/compare_test.go` by skipping tests with no consensus, which were the source of the previous unknowns in the test. Based on advice from cburgmer/json-path-comparison#153#issuecomment-3374075044. While at it, upgrade `golangci-lint` to v2.5.0 and tweak its configuration to scan `compare/compare_test.go` and fix the long lines it complains about. Also have the `test-compare` target run the tests verbosely, and run the CI tests on Go 1.25.
Simplify `compare/compare_test.go` by skipping tests with no consensus, which were the source of the previous unknowns in the test. Based on advice from cburgmer/json-path-comparison#153#issuecomment-3374075044. While at it, upgrade `golangci-lint` to v2.5.0 and tweak its configuration to scan `compare/compare_test.go` and fix the long lines it complains about. Also have the `test-compare` target run the tests verbosely, and run the CI tests on Go 1.25.
|
Great, that's what I needed to know. I updated my tests to skip cases with no consensus. That eliminates all the unknowns in the tests themselves (I was already tracking errors for those with consensus). |
I could not figure out how to run the full suite, so started adding tests in theory/jsonpath#22. However, it's not clear to me what the behavior should be when there is no
consensusfield in a query object. Should it expect a compile error? Selection error? Empty result?