fix(export,scope): record the Java types a model names as dependencies - #1556
Merged
joaodinissf merged 2 commits intoSep 30, 2026
Merged
Conversation
rubenporras
previously approved these changes
Sep 28, 2026
Java types named in `extension` and `inject` declarations and in expressions (casts, collection element types, receivers of static calls) are resolved only while the Java is generated, so they were neither imported names nor references of an export or scope model, and a change to such a type did not re-queue the model. Export and Scope now bind resource description managers, sharing a base class in the expression bundle, that add these types to the model's imported names in the form in which changed Java types are reported. For Scope this includes the types named by included scope models, which the generated provider uses as well. Fixes dsldevkit#1554 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the helper that parses an export model next to an empty grammar resource into ExportTestUtil, so ExportJvmModelInferrerTest and ExportResourceDescriptionManagerTest no longer duplicate it (CPD). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LgVRfQCTxSDwGrN8J5s6fd
joaodinissf
force-pushed
the
fix/export-extension-dependencies
branch
from
September 28, 2026 23:29
c01a214 to
ee533fa
Compare
rubenporras
reviewed
Sep 30, 2026
| * the segments of the qualified type name, must not be {@code null} | ||
| * @return the name, never {@code null} | ||
| */ | ||
| protected static QualifiedName javaName(final List<String> segments) { |
Member
There was a problem hiding this comment.
since this is a protected method and all consumers use split to create an array, why not have the input parameter String[]? You can have a stream on the array as well and avoid the object creation.
rubenporras
requested changes
Sep 30, 2026
rubenporras
approved these changes
Sep 30, 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.
Fixes #1554
Why the change
A change to a Java class that an export or scope model names only by name (an
extension, aninject, or a type in an expression) now re-queues the model, so its generated Java no longer goes stale.Special things to note
Change outline
Where the pieces live:
What a model imports now:
Tests, red-green checked (bindings removed: these fail; restored: 380 tests, 0 failures):
ExportResourceDescriptionManagerTest: extension class and expression types are imported and affect the model.ScopeResourceDescriptionManagerTest: own and included extension, inject and factory types are imported, and a type only an included model names affects the model; a model without them is not affected.🤖 Generated with Claude Code