Fix missing scalajs-java-logging dependency for AirSpec on Scala.js #4007
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.
AirSpec embeds the source code from
airframe-log
which usesjava.util.logging
APIs. On Scala.js, these APIs require theorg.scala-js:scalajs-java-logging
library to be available at runtime, but this dependency was not explicitly declared in the publishedairspec_sjs1
artifact.This caused linking errors for users trying to use AirSpec on Scala.js unless they manually added the dependency to their projects:
Root Cause:
AirSpec uses a unique build structure where it embeds source code from multiple airframe modules (
airframe-log
,airframe-di
,airframe-surface
, etc.) to create a standalone library. While the embeddedairspecLogJS
module correctly declared thescalajs-java-logging
dependency, the finalairspecJS
artifact did not include this as a transitive dependency.Solution:
Added
scalajs-java-logging
as an explicit dependency to theairspecJS
module in the Scala.js-specific build settings. This ensures that users of AirSpec on Scala.js automatically get the required dependency without manual intervention.Changes:
("org.scala-js" %%% "scalajs-java-logging" % JS_JAVA_LOGGING_VERSION).cross(CrossVersion.for3Use2_13)
toairspec/build.sbt
java.util.logging
functionality works correctly on Scala.jsVerification:
java.util.logging
APIs to ensure the dependency is workingairspecJS
module dependenciesFixes #4006.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.