Repository navigation
Declare the javax.xml.stream shims under :jolt/provides - #2
Merged
Merged
Conversation
jolt.xml registers XMLInputFactory, XMLStreamConstants and
org.xml.sax.InputSource, but deps.edn declared none of them. Jolt
resolves the class references in a dependency namespace against the
provides table before that namespace compiles, which is earlier than
any require can run, so a library loaded from ~/.m2 that imports
javax.xml.stream fails with
No dependency provides javax.xml.stream.XMLStreamConstants
however early install! runs. cognitect aws-api's
cognitect.aws.util.xml is one such namespace: it imports
XMLInputFactory, XMLStreamConstants and XMLStreamReader directly, so
aws-api cannot load on jolt without this.
Verified by removing the local workaround from a project that had one
(jlt-commons/aws-api-jolt, which carried its own table plus a
require-for-effect namespace) and running its suite against this
branch: 24 tests, 43 assertions, green, with no table of its own.
jolt.xml's own tests stay green at 7/7.
XMLStreamReader is deliberately not declared. The reader is a tagged
table reached through __register-class-methods!, not a registered
class, so claiming it would claim something that does not exist.
Note for anyone carrying the workaround: jolt refuses a duplicate
claim ("two dependencies both claim to provide the host class ..."),
so a consumer that declared these classes itself must drop its table
when it picks this up.
burinc
added a commit
to jlt-commons/aws-api-jolt
that referenced
this pull request
Sep 19, 2026
jolt-lang/xml#2 is merged, so xml declares javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLStreamConstants and org.xml.sax.InputSource itself. This library no longer needs to claim them. Keeping the table is not merely redundant, it breaks the build: jolt refuses a duplicate claim with "two dependencies both claim to provide the host class javax.xml.stream.XMLInputFactory", so bumping the xml pin without this change fails to start. Removes deps.edn's :jolt/provides table, deletes the require-for-effect namespace it pointed at, and drops that require from the three test namespaces. Bumps the xml pin to 90706d5. Offline 24 tests / 43 assertions and the live four-protocol suite both stay green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1.
What
Declares the JDK classes
jolt.xml/install!already registers under:jolt/provides, so a Maven-loaded namespace that importsjavax.xml.streamcan resolve them.
Jolt resolves the class references in a dependency namespace against the
provides table before that namespace compiles, which is earlier than any
requirein this library can run. Without the declaration, a project dependingon both this library and
com.cognitect.aws/apifails withhowever early
install!runs.Scope
Three classes, exactly the ones
install!registers:javax.xml.stream.XMLInputFactoryjavax.xml.stream.XMLStreamConstantsorg.xml.sax.InputSourcejavax.xml.stream.XMLStreamReaderis deliberately absent. The reader is atagged table reached through
__register-class-methods!, not a registeredclass, so declaring it would claim something that does not exist. aws-api names
it only in type hints, which jolt does not resolve.
Comment-only change beyond the table itself; no code touched.
Verification
jolt -M:teston this branch: 7 tests, 7 assertions, 0 failures, 0 errors.jlt-commons/aws-api-jolt
entirely — both its own
:jolt/providestable and the require-for-effectnamespace it existed to point at — pointed it at this branch via
:local/root, and ran its suite: 24 tests, 43 assertions, green. That isthe check that matters: the consumer needs no table of its own once this
lands.
Verified against
upstream/mainatdd7b80aon 2026-09-20.Compatibility
Mildly breaking for anyone already carrying the workaround. Jolt refuses a
duplicate claim:
so such a consumer must drop its own table when picking this up. I hit this
while writing the acceptance test. Might be worth a release-note line.