perf(export): ignore Java-only changes when deciding whether an export model is affected - #1548
Closed
joaodinissf wants to merge 1 commit into
Closed
joaodinissf wants to merge 1 commit into
joaodinissf wants to merge 1 commit into
Conversation
Since the Xbase migration (dsldevkit#1405) the Export language uses the default XbaseResourceDescriptionManager. Its descriptions record, as imported names and outgoing references, the JVM types of the inferred model - including the EMF interfaces of the exported EClasses (parameter types from GenModelUtilX.instanceClassName) and all their super interfaces. JDT deltas for those types (JavaChangeQueueFiller -> JdtQueuedBuildData -> pending deltas of the builder) therefore mark every export model referencing them as affected, so a branch switch that only changes Java files re-processes and recompiles export models; before dsldevkit#1405 it never did. Bind an ExportResourceDescriptionManager that drops java:/ deltas before the affectedness check. The generated code depends only on the EMF model (ecore and genmodel), whose deltas still affect export models, as they did before dsldevkit#1405. PROTOTYPE: not for review; to be measured with the branch-switch benchmark. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rubenporras
reviewed
Sep 25, 2026
| * <p> | ||
| * The inferred JVM model of an export model references the Java interfaces of the exported EClasses, so the Xbase | ||
| * description manager records them as imported names and outgoing references. The builder then re-processes every export | ||
| * model whenever JDT reports a structural change to one of those interfaces, although the generated code only depends |
Member
There was a problem hiding this comment.
This is for sure not true, export language can use java classes at will from extensions. For example:
extension com::foo::^export::Bar
and the
export lookup x::TypeN as qualified name [isBlaBla(this.eContainer)]{
object-fingerprint;
}
where isBlaBla is defined in com.foo.exportBar
Collaborator
Author
|
@rubenporras: you're right that export models depend on Java beyond the EMF model, so the premise of this PR (and its Javadoc) is wrong. I dug into what that means for rebuilds:
So I'm closing this PR. The merged #1546 and #1547 carry the measurable gains. 🤖 Generated with Claude Code |
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.
For discussion. This stops Java-only changes from re-queuing and regenerating
.exportfiles (part of #1545).What changed
Since #1405, Export is an Xbase language. Its resource descriptions (
XbaseResourceDescriptionManager) record the JVM types of the inferred model as imported names, and those include the downstream EMF interfaces that come fromgenModelUtil.instanceClassName. Any JDT change to those interfaces therefore marks every.exportthat uses them as affected. The.exportis then re-linked, re-inferred and regenerated. That generated Java is recompiled, and the build does another round. Before #1405,.exportfiles imported no Java names and were never re-queued by Java changes.A new
ExportResourceDescriptionManager(bound inExportRuntimeModule) dropsjava:/deltas before theisAffectedchecks. Deltas from ecore/genmodel resources and from other DSL files are still honoured.Why this should be safe. The generated Java is built from genmodel data:
instanceClassNameis a string, andtypeRef(String)only prints that name. It does not depend on what the Java type contains.Trade-off. Suppose a Java interface is renamed or removed without a genmodel change. The
.exportis then not regenerated, and its generated Java shows a compile error, as it did before #1405. An unresolved-type marker on the.exportstays until the file is touched or a clean build runs.Verification
.exportre-processed 2 → 0, files written 260 → 205 (.java32 → 22), allocation −9%..ecore/.genmodelstill re-processes the dependent.export,.scopeand.xtendfiles (3 / 8 / 16), exactly as on master except the Java-triggered one. 0 errors.ClusteringModule), which does not re-queue these files to begin with.🤖 Generated with Claude Code
https://claude.ai/code/session_01LgVRfQCTxSDwGrN8J5s6fd