Skip to content

Update classgraph to 5.0.0 - #1355

Merged
pjfanning merged 1 commit into
apache:mainfrom
scala-steward:update/classgraph-6.0.0
Oct 16, 2026
Merged

pjfanning merged 1 commit into
apache:mainfrom
scala-steward:update/classgraph-6.0.0

Conversation

@scala-steward

@scala-steward scala-steward commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

classgraph 6.0.0 is compiled for Java 25 (class file version 69, Require-Capability: osgi.ee ... version=25) and cannot run on Java 17. 5.0.0 targets Java 17 (class file version 61) but has a reworked API, which broke compilation of the test specs.

Modification

  • Use classgraph 5.0.0 instead of 6.0.0.
  • Migrate test code to the 5.x API: getInterfaces.directOnly → getDirectSuperinterfaces, getSuperclasses → getAllSuperclasses, MethodInfo.getAnnotationInfo → getDirectAnnotationInfo.
  • Pass the spec's ClassLoader via enableClassLoaders, since 5.x scans nothing unless a classpath source is enabled.
  • Pin classgraph to 5. in .scala-steward.conf.

Result

The test-only classgraph dependency is upgraded and still runs on Java 17.

Tests

  • sbt "http-tests/testOnly org.apache.pekko.http.javadsl.DirectivesConsistencySpec" (JDK 17): 321 succeeded, same as with 4.8.199
  • sbt "docs/testOnly docs.ApiMayChangeDocCheckerSpec" (JDK 17): 2 succeeded, same as with 4.8.199
  • scalafmt: no changes

References

None - supersedes the Scala Steward 6.0.0 update in this PR

Motivation:
classgraph 6.0.0 is compiled for Java 25 (class file version 69) and
cannot run on Java 17. 5.0.0 targets Java 17 but has a reworked API.

Modification:
- Use classgraph 5.0.0 instead of 6.0.0.
- Migrate test code to the 5.x API: getDirectSuperinterfaces,
  getAllSuperclasses and getDirectAnnotationInfo.
- Pass the spec's ClassLoader via enableClassLoaders, since 5.x scans
  nothing unless a classpath source is enabled.
- Pin classgraph to 5.x in .scala-steward.conf.

Result:
Test-only classgraph dependency is upgraded and still runs on Java 17.

Tests:
- sbt "http-tests/testOnly org.apache.pekko.http.javadsl.DirectivesConsistencySpec" (JDK 17): 321 succeeded, same as with 4.8.199
- sbt "docs/testOnly docs.ApiMayChangeDocCheckerSpec" (JDK 17): 2 succeeded, same as with 4.8.199
- scalafmt: no changes

References:
Refs apache#1355
@pjfanning
pjfanning force-pushed the update/classgraph-6.0.0 branch from 91d7fca to 2ce952f Compare October 16, 2026 16:06
@pjfanning pjfanning changed the title Update classgraph to 6.0.0 Update classgraph to 5.0.0 Oct 16, 2026

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pjfanning
pjfanning merged commit 8aa98a6 into apache:main Oct 16, 2026
6 checks passed
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