Fix missing scalajs-java-logging dependency for AirSpec on Scala.js#4007
Merged
Fix missing scalajs-java-logging dependency for AirSpec on Scala.js#4007
Conversation
AirSpec embeds airframe-log source code which uses java.util.logging. On Scala.js, this requires the org.scala-js:scalajs-java-logging dependency, but it wasn't explicitly declared in the airspecJS module dependencies. This adds the missing dependency and includes a test to verify the fix. Co-authored-by: xerial <57538+xerial@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] AirSpec: Missing dependency on Scala.js: org.scala-js:scalajs-java-logging
Fix missing scalajs-java-logging dependency for AirSpec on Scala.js
Aug 13, 2025
The test uses java.util.logging which is not available in Scala Native, so it needs to be in a JS-specific source directory.
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.
AirSpec embeds the source code from
airframe-logwhich usesjava.util.loggingAPIs. On Scala.js, these APIs require theorg.scala-js:scalajs-java-logginglibrary to be available at runtime, but this dependency was not explicitly declared in the publishedairspec_sjs1artifact.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 embeddedairspecLogJSmodule correctly declared thescalajs-java-loggingdependency, the finalairspecJSartifact did not include this as a transitive dependency.Solution:
Added
scalajs-java-loggingas an explicit dependency to theairspecJSmodule 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.sbtjava.util.loggingfunctionality works correctly on Scala.jsVerification:
java.util.loggingAPIs to ensure the dependency is workingairspecJSmodule 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.