Skip to content

fix(devloop): recompile the app when a reactor sibling leaves the loop - #25465

Open
tltv wants to merge 1 commit into
mainfrom
fix/devloop-removing-reactor-sibling-dependency
Open

fix(devloop): recompile the app when a reactor sibling leaves the loop#25465
tltv wants to merge 1 commit into
mainfrom
fix/devloop-removing-reactor-sibling-dependency

Conversation

@tltv

@tltv tltv commented Sep 3, 2026

Copy link
Copy Markdown
Member

The module set is derived from the app's resolved classpath, so dropping a sibling dependency removes both the sibling's target/classes and the sibling itself from the loop. That module-set change rebuilt Compile, whose constructor re-seeded compiledAgainst from the project as it now stood - overwriting the app's classpath baseline with the already-moved classpath. classpathForced then saw no movement and forced no recompile, so the apply fell through to the drift restart and reported Stable while the page broke with ClassNotFoundException. An external jar was unaffected: it changes no module, so the baseline survived and the forced recompile fired.

Compile now takes the outgoing baseline and carries compiledAgainst over for every module still in the loop. The app module is recompiled whole, and javac's diagnostic ends the apply as Failed before the restart leg runs. Only the classpath baseline is carried; per-file stamps still start afresh, as they describe a different build.

The module set is derived from the app's resolved classpath, so dropping a
sibling dependency removes both the sibling's target/classes and the sibling
itself from the loop. That module-set change rebuilt Compile, whose
constructor re-seeded compiledAgainst from the project as it now stood -
overwriting the app's classpath baseline with the already-moved classpath.
classpathForced then saw no movement and forced no recompile, so the apply
fell through to the drift restart and reported Stable while the page broke
with ClassNotFoundException. An external jar was unaffected: it changes no
module, so the baseline survived and the forced recompile fired.

Compile now takes the outgoing baseline and carries compiledAgainst over for
every module still in the loop. The app module is recompiled whole, and
javac's diagnostic ends the apply as Failed before the restart leg runs.
Only the classpath baseline is carried; per-file stamps still start afresh,
as they describe a different build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Carrying the outgoing baseline reroutes a sibling drop from a silent restart to a compile failure

flowchart LR
    subgraph Before
        direction TB
        B1["new Compile(project)"] -->|re-seeds baseline from moved classpath| B2["classpathForced() sees no movement"]
        B2 -->|no forced recompile| B3["classpathDrift() escalates to restart"]
        B3 -->|next page load| B4["ClassNotFoundException"]
    end
    subgraph After
        direction TB
        A1["new Compile(project, current)"]:::changed -->|carries previous compiledAgainst| A2["classpathForced() forces app sources"]
        A2 -->|recompiles app module| A3["javac diagnostic"]
        A3 -->|ends apply before restart leg| A4["Failed"]
    end
    Before ~~~ After
    classDef changed stroke:#c9a227,stroke-width:3px
Loading

The figure shows TransactionEngine.compileFor rebuilding Compile when the module set changes. Before, the constructor re-seeded compiledAgainst from the already-moved classpath, so Compile.classpathForced found no movement and the apply fell through to the classpathDrift restart, surfacing the removed type as a ClassNotFoundException. After, new Compile(project, current) carries the outgoing baseline over, so classpathForced recompiles the app module and javac's diagnostic ends the apply as Failed. Mechanism per the pull request description and the diff in Compile.java and TransactionEngine.java.

Diagram Bot draws the mechanism this pull request touches; it does not review the change. Verify it against the diff.

Generated by Diagram Bot for issue #25465 ·

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 433 files  ±0   1 517 suites  ±0   1h 36m 13s ⏱️ -30s
11 862 tests +2  11 795 ✅ +2  67 💤 ±0  0 ❌ ±0 
12 181 runs  +2  12 113 ✅ +2  68 💤 ±0  0 ❌ ±0 

Results for commit 66ec1ca. ± Comparison against base commit 9e33987.

♻️ This comment has been updated with latest results.

@github-actions github-actions Bot added the +0.0.1 label Sep 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant