Repository navigation
Parity runner: support fixture appliesTo and an edition key - #75
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Part of the GitHub Issues integration. Closes #73.
What
The Kotlin parity runner (
core/src/testFixtures/.../parity/SpecFixtures.kt) now supports the spec's fixture-fileappliesToand takes the runner's edition key.Runner API (for the Pro session)
class FixtureSet(dir: File, edition: String = SpecFixtures.APP_KEY): the files of onefixtures/folder as seen by one edition.allIds(),ids()(applicable files),skippedIds()(recognised but excluded byappliesTo),appliesTo(id),isApplicable(id),load(id)(empty when not applicable).SpecFixtureskeeps its API and gains an optionaleditionparameter, default"android":ids(edition),load(id, edition),skippedIds(edition),requireSet(edition). New constantsSpecFixtures.APP_KEY = "android"andSpecFixtures.PRO_KEY = "android-pro".SpecFixtures.ids(SpecFixtures.PRO_KEY)/SpecFixtures.load("issues/pull", SpecFixtures.PRO_KEY), in its own coverage test. A file with noappliesToapplies to every edition; a file listingandroidalso applies toandroid-pro(the spec README:androidis Libre and Pro), while a file listing onlyandroid-prois skipped in Libre.knownDivergenceis still read under the keyandroidfor both editions (the schema has noandroid-prodivergence key).SpecCoverageTest.everyFixtureIsMappedcompares only the applicable ids with the mappings; newfilesExcludedByAppliesToAreSkippedreports the excluded files as skipped (JUnit assumption) and asserts none is mapped.Differences from the issue
spec/submodule (the spec is private and Libre is public; Libre CI has noParityjob, and the fixtures run only when-Pmarknotes.specDirpoints at a checkout, in Pro). So there is no pin to bump here; Pro adopts the spec pin. Verified locally against the specmaincheckout atea4a41finstead.Verified
./gradlew :core:test --tests '*parity*' -Pmarknotes.specDir=~/Projects/marknotes-spec(spec atea4a41f): green; the sixissues/*files are reported as skipped forandroid.FixtureSetTest(synthetic files): Libre skips issues files,android-proselects them, files withoutappliesToapply everywhere, an unmapped applicable file is still detected../gradlew ktlintCheck detekt: green.Public API of
:coretestFixtures changes additively; Pro needs no change until it adopts the issues fixtures.🤖 Generated with Claude Code