Skip to content

Fix CSS Spy for the e4 engine's SAC removal#2385

Open
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:css-spy-retire-sac
Open

Fix CSS Spy for the e4 engine's SAC removal#2385
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:css-spy-retire-sac

Conversation

@vogella

@vogella vogella commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

After the e4 CSS engine dropped SAC, the CSS Spy's scratch pad still caught org.w3c.css.sac.CSSParseException, which is no longer thrown and is no longer shipped.
A syntax error therefore threw the engine's unchecked CssParseException uncaught instead of showing the error. This catches it generically; the line and column still appear because they are part of the exception message.

It also repairs the spy's matched-rule lookup, which tested the engine with instanceof DocumentCSS. The engine only implements CSSEngine now, so that test was always false and the rule-source column stayed empty; it uses getDocumentCSS() instead.

Both changes use only API present on the current platform, so the bundle builds against the released target (verified with mvn verify).

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Test Results

  129 files  ±0    129 suites  ±0   38m 4s ⏱️ + 1m 1s
3 527 tests ±0  3 473 ✅ ±0   54 💤 ±0  0 ❌ ±0 
9 384 runs  ±0  9 254 ✅ ±0  130 💤 ±0  0 ❌ ±0 

Results for commit fd39ce3. ± Comparison against base commit 5da4977.

♻️ This comment has been updated with latest results.

The scratch pad caught org.w3c.css.sac.CSSParseException, which the e4 CSS
engine no longer throws and which is no longer shipped after the SAC removal.
A syntax error now throws the engine's unchecked CssParseException, so the
catch was dead code and the error propagated instead of being shown. Catch it
generically; the line and column are still shown because they are part of the
exception message.

Also fix the spy's matched-rule lookup, which tested the engine with
instanceof DocumentCSS. The engine only implements CSSEngine now, so that test
was always false; use getDocumentCSS() instead.
@vogella vogella force-pushed the css-spy-retire-sac branch from a10f4a4 to fd39ce3 Compare June 26, 2026 08:10
@vogella vogella changed the title Migrate CSS Spy off the retired SAC CSS API Fix CSS Spy for the e4 engine's SAC removal Jun 26, 2026
@vogella

vogella commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@HannesWell this warning seems unrelated, can you have a look?

Some attempts to read artifact osgi.bundle,org.osgi.service.event.source,1.4.1.202109301733 failed: An error occurred while transferring artifact canonical: osgi.bundle,org.osgi.service.event.source,1.4.1.202109301733 from repository https://download.eclipse.org/eclipse/updates/4.40/R-4.40-202606010713: Retry another mirror: download from https://mirror.ibcp.fr/pub/eclipse/eclipse/updates/4.40/R-4.40-202606010713/plugins/org.osgi.service.event.source_1.4.1.202109301733.jar failed

@merks

merks commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@HannesWell this warning seems unrelated, can you have a look?

Some attempts to read artifact osgi.bundle,org.osgi.service.event.source,1.4.1.202109301733 failed: An error occurred while transferring artifact canonical: osgi.bundle,org.osgi.service.event.source,1.4.1.202109301733 from repository https://download.eclipse.org/eclipse/updates/4.40/R-4.40-202606010713: Retry another mirror: download from https://mirror.ibcp.fr/pub/eclipse/eclipse/updates/4.40/R-4.40-202606010713/plugins/org.osgi.service.event.source_1.4.1.202109301733.jar failed

Sometimes mirrors. Fail. Not a big deal because p2 will try another one. Ignore it.

@vogella vogella marked this pull request as ready for review June 26, 2026 10:20
@vogella

vogella commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@HannesWell this warning seems unrelated, can you have a look?

Sometimes mirrors. Fail. Not a big deal because p2 will try another one. Ignore it.

Thanks for the feedback. This is not urgent (and also because I run Eclipse primary from a patched build for PDE, as otherwise it is mostly unusable for me due to its classpath performance degregation in the last release) so I leave it open and hope that the warning will be removed in the future or the warning count will be reset.

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