Skip to content

fix: suppress SLF4J startup warning in Tycho test runtime#1299

Merged
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:fix/slf4j-suppress-warning
Apr 8, 2026
Merged

fix: suppress SLF4J startup warning in Tycho test runtime#1299
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:fix/slf4j-suppress-warning

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

@joaodinissf joaodinissf commented Apr 1, 2026

Summary

  • Remove unused org.slf4j imports from three test manifests
  • Suppress the SLF4J(W): No SLF4J providers were found warning during Tycho Surefire test execution via -Dslf4j.internal.verbosity=ERROR

The warning is cosmetic — SLF4J defaults to NOP regardless. ServiceLoader-based provider discovery doesn't work across OSGi classloaders, which is a known limitation shared by Eclipse Platform.

References

🤖 Generated with Claude Code

@joaodinissf
Copy link
Copy Markdown
Collaborator Author

joaodinissf commented Apr 1, 2026

This PR is stacked on #1280 (which adds slf4j.nop to the target platform and cleans up stale org.slf4j imports). See #1280 for the full investigation into why the SLF4J warning occurs in OSGi and why it cannot be resolved at the bundle level.

No longer stacked — #1280 was closed. This PR now carries both the manifest cleanup and the warning suppression.

rubenporras
rubenporras previously approved these changes Apr 2, 2026
@joaodinissf joaodinissf force-pushed the fix/slf4j-suppress-warning branch from 1199fae to c174520 Compare April 6, 2026 21:49
@joaodinissf joaodinissf marked this pull request as ready for review April 7, 2026 07:22
joaodinissf and others added 2 commits April 7, 2026 21:13
Remove Import-Package: org.slf4j from three test manifests where no
source file references SLF4J (check.ui.test, xtext.test, xtext.test.core).
Retain org.slf4j in test.ui (SwtBot).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set -Dslf4j.internal.verbosity=ERROR in the Tycho Surefire argLine.
SLF4J 2.x uses ServiceLoader for provider discovery, which doesn't
work across OSGi classloaders — the warning is cosmetic (SLF4J
defaults to NOP regardless). This is the documented suppression
mechanism since SLF4J 2.0.10.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joaodinissf
Copy link
Copy Markdown
Collaborator Author

Dropped slf4j.nop from the target platform. The previous version added slf4j.nop 2.0.17 to ddk.target, but it served no purpose: SLF4J's ServiceLoader-based provider discovery doesn't work across OSGi classloaders, so the NOP bundle was installed but never discovered. The actual fix is the -Dslf4j.internal.verbosity=ERROR system property, which suppresses the warning directly. No point adding a dependency that nothing can use.

@joaodinissf joaodinissf merged commit 1dc68fe into dsldevkit:master Apr 8, 2026
3 checks passed
@joaodinissf joaodinissf deleted the fix/slf4j-suppress-warning branch April 9, 2026 07:55
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