Skip to content

Conversation

@dmarcotte
Copy link
Contributor

Generate a cross-platform set of JSON-validation tests based on the JSONTestSuite project to help validate Kson's goal of being a JSON-superset.

Also incorporate the generator into our build using custom gradle task GenerateJsonTestSuiteTask so that this is seamless for developers and CI.

The experiment started in 17cbf03 of keeping these in git went
fairly well, with just a bit of churn, but we're about to introduce an
embedded intellij project in `buildSrc/`, and dual maintaining this
seems like too much.

So back to basics: no committed IDE configs (our `build.gradle.kts`
files should be responsible for fully determining the project structure
and settings anyway)
Prepare for some planned advanced build features by setting up a [Gradle
`buildSrc/`](https://stackoverflow.com/questions/13874680/what-is-the-purpose-of-gradles-buildsrc-folder/13875350#13875350)
project for our build
The native compilation and tests in particular were running out of
memory in some cases using the defaults.
Generate a cross-platform set of JSON-validation tests based on the
[JSONTestSuite](https://github.com/nst/JSONTestSuite) project to
help validate Kson's goal of being a JSON-superset.

Also incorporate the generator into our build using custom gradle
task `GenerateJsonTestSuiteTask` so that this is seamless for
developers and CI.
Replace the static placeholder test name with the appropriate test name
in the comment links on the `JsonSuiteTest` tests
Generate the `JsonSuiteTest` tests alphabetically since it's an easy
bit of organization to automate in the generation, and it makes the
large file more easily browsable
We had the tests depending on this generation, but that's actually a
bit too late: it needs to run before test compile.

Note that I was not able to figure how to configure the Kotlin MPP
compile task types, so we simply ensure `generateJsonTestSuiteTask`
runs before _every_ task (this is fine since it caches well and is
almost always up-to-date)
Organize our not-yet-supported tests into [JsonTestSuiteSkipList],
getting our build green on the supported tests and staking out the work
needed to achieve full JSON-compatibility
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.

1 participant