chore: sync more tests and support ignoring#614
Merged
stephenamar-db merged 1 commit intodatabricks:masterfrom Mar 1, 2026
Merged
chore: sync more tests and support ignoring#614stephenamar-db merged 1 commit intodatabricks:masterfrom
stephenamar-db merged 1 commit intodatabricks:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the upstream test-suite sync workflow so sjsonnet can selectively skip known-incompatible upstream tests, while also adding coverage for parser recursion depth handling.
Changes:
- Add per-suite
.sync_ignoresupport tosync_test_suites.shso specific upstream tests (and their goldens) can be excluded during syncing. - Add a new parse-depth regression test (
error.parse.deep_array_nesting.jsonnet+ golden) to ensure recursion-depth errors are handled deterministically. - Fix
CachedResolver.parseto correctly returnLeft(ParseError)even when theParseErrorhas no offset (e.g., recursion-depth errors).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sync_test_suites.sh | Adds .sync_ignore loading and skip logic during sync. |
| sjsonnet/src/sjsonnet/Importer.scala | Ensures offset-less ParseErrors are returned as Left rather than escaping the parser wrapper. |
| sjsonnet/test/resources/test_suite/error.parse.deep_array_nesting.jsonnet | Adds a deep-nesting input intended to trigger the parser recursion-depth guard. |
| sjsonnet/test/resources/test_suite/error.parse.deep_array_nesting.jsonnet.golden | Adds expected output for the recursion-depth parse failure. |
| sjsonnet/test/resources/test_suite/.sync_ignore | Introduces an ignore list for the C++ test suite (initially excluding error.std_parseYaml1.jsonnet). |
| sjsonnet/test/resources/go_test_suite/.sync_ignore | Introduces an (initially empty) ignore list for the Go test suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
He-Pin
commented
Feb 28, 2026
| val docs = docSplitPattern.split(s, -1) | ||
| docs.size match { | ||
| // Split YAML multi-document stream manually, similar to SnakeYAML's loadAll | ||
| // since parseManyYamls doesn't handle all cases correctly |
Contributor
Author
There was a problem hiding this comment.
He-Pin
commented
Feb 28, 2026
| # | ||
| # error.std_parseYaml1.jsonnet: sjsonnet uses SnakeYAML/scala-yaml which | ||
| # successfully parses 'a: b:' as {"a":"b:"}, unlike RapidYAML which errors. | ||
| error.std_parseYaml1.jsonnet |
Contributor
Author
There was a problem hiding this comment.
stephenamar-db
approved these changes
Mar 1, 2026
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.
Motivation:
Some tests are not suitable for sjsonnet, eg, error.std_parseYaml1.jsonnet
in google/jsonnet#1292