Skip to content

Fail fast when a model processor prerequisite is missing - #4284

Open
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:binding-processor-fail-fast
Open

Fail fast when a model processor prerequisite is missing#4284
vogella wants to merge 2 commits into
eclipse-platform:masterfrom
vogella:binding-processor-fail-fast

Conversation

@vogella

@vogella vogella commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

BindingToModelProcessor logged that CommandManager or ContextManager was null and then handed those nulls to the BindingManager constructor, which rejects them. ModelAssembler swallowed the resulting NPE, so BindingManager never reached the application context and the failure only surfaced much later as an InjectionException on BindingService during workbench startup, several frames away from the real cause and naming none of the three processors involved.

The processor now fails immediately with a message naming the processor that should have supplied the missing value, and ModelAssembler reports a failing processor as an error including its class name rather than a warning that says only "Could not run processor". The two @Reference fields that order this processor after its two siblings are now read in process(), so an unused-field cleanup can no longer drop them and silently break the ordering that has carried this since the DS migration in #2402.

This came out of a real investigation: removing those two annotations is invisible to javac, to the Java builder, to CI and to every headless test, yet it leaves a dead workbench with nothing in the log connecting the symptom to the cause. Failing fast turns that into a single readable log entry.

@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 7dce7e9a54df19af3c3a547fd5ad8c13e7aeda1b Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 26 Aug 2026 22:12:26 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
index 79b52fd9e9..be8da05548 100644
--- a/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench;singleton:=true
-Bundle-Version: 1.18.300.qualifier
+Bundle-Version: 1.18.400.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.55.0

Further information are available in Common Build Issues - Missing version increments.

vogella and others added 2 commits August 27, 2026 00:17
BindingToModelProcessor logged that CommandManager or ContextManager was
null and then passed the nulls to the BindingManager constructor, which
rejects them. The resulting NPE was swallowed by ModelAssembler and only
surfaced much later as an InjectionException on BindingService, hiding
the real cause.

It now throws with a message naming the processor that should have
provided the missing value, and reads the two @reference fields that
establish the ordering, so they can no longer be dropped as unused.
ModelAssembler logs a failing processor as an error and names it, instead
of a warning without the class.
@vogella
vogella force-pushed the binding-processor-fail-fast branch from 07554a2 to 4f7e866 Compare August 26, 2026 22:18
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   47m 30s ⏱️ - 10m 14s
 8 174 tests ±0   7 931 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 768 ✅ ±0  656 💤 ±0  0 ❌ ±0 

Results for commit 4f7e866. ± Comparison against base commit f0ef795.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants