-
Notifications
You must be signed in to change notification settings - Fork 0
Consolidate the context module
#249
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR consolidates the validation project structure by merging the context and model modules. The production code is now in the context module, while the model module has been renamed to context-tests to reflect its test-only nature.
Key Changes:
- Removed
RequiredIdOptionReactionandRequiredIdPatternReactionclasses as they're moving to CoreJvm Compiler - Eliminated the
configurationmodule (no longer needed) - Consolidated proto files into the
contextmodule - Updated dependency references from
CoreJavatoCoreJvm
Reviewed changes
Copilot reviewed 27 out of 92 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumped version from 375 to 376 |
| settings.gradle.kts | Updated module structure: removed proto submodules, added context and context-tests |
| proto/build.gradle.kts | Removed entire proto parent module build file |
| pom.xml | Version updates and dependency cleanup (removed spine-server, bouncycastle, kotlin libs) |
| model/.../RequiredId*.kt | Removed reaction classes moving to CoreJvm Compiler |
| model/.../WithValidationSettings.kt | Removed settings interface no longer needed |
| java/build.gradle.kts | Updated dependencies to use new context module |
| java-bundle/build.gradle.kts | Updated CoreJava to CoreJvm references |
| context/.../proto/*.proto | New proto files for validation views and events |
| context/.../kotlin/*.kt | New Kotlin source files for validation options |
| context/build.gradle.kts | New build configuration for context module |
| context-tests/** | Test fixtures and specs moved from model module |
| buildSrc/** | Updated dependency versions and references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| apply(plugin = "io.spine.core-jvm") | ||
|
|
||
| dependencies { | ||
| api(Compiler.backend) | ||
| api(Compiler.jvm) | ||
| implementation(Base.lib) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore core runtime dependencies in
context module
The new context build file only pulls in compiler artifacts and spine-base, but the sources moved into this module now import server classes such as io.spine.server.event.React and io.spine.server.tuple.EitherOf2 (e.g. context/src/main/kotlin/io/spine/tools/validation/option/ChoiceOption.kt lines 29‑38). Previously the model module declared CoreJava.server/jvm-runtime to supply those types; after the consolidation those dependencies were dropped, so the context module’s compile classpath lacks the Spine server runtime and will fail to compile any of the option reactions. Add the core runtime dependency back to this module so the server types resolve.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #249 +/- ##
============================================
+ Coverage 34.82% 34.99% +0.16%
+ Complexity 288 276 -12
============================================
Files 141 137 -4
Lines 3104 3049 -55
Branches 249 244 -5
============================================
- Hits 1081 1067 -14
+ Misses 1944 1908 -36
+ Partials 79 74 -5 🚀 New features to boost your workflow:
|
This PR improves the project structure consolidating the production code of the
contextandmodelmodules. Themodelmodule was renamed tocontext-teststo reflect the nature of the containing test-only code.Other notable changes
RequiredIdOptionReactionandRequiredIdPatternReactionwere removed because they are going to become a part of CoreJvm Compiler.configurationwas removed because it is no longer needed. CoreJvm Compiler no longer passes settings to Validation.