Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 13, 2025

AirSpec embeds the source code from airframe-log which uses java.util.logging APIs. On Scala.js, these APIs require the org.scala-js:scalajs-java-logging library to be available at runtime, but this dependency was not explicitly declared in the published airspec_sjs1 artifact.

This caused linking errors for users trying to use AirSpec on Scala.js unless they manually added the dependency to their projects:

// Users had to manually add this dependency
libraryDependencies += "org.scala-js" %%% "scalajs-java-logging" % "1.0.0"

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 embedded airspecLogJS module correctly declared the scalajs-java-logging dependency, the final airspecJS artifact did not include this as a transitive dependency.

Solution:
Added scalajs-java-logging as an explicit dependency to the airspecJS 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:

  • Added ("org.scala-js" %%% "scalajs-java-logging" % JS_JAVA_LOGGING_VERSION).cross(CrossVersion.for3Use2_13) to airspec/build.sbt
  • Added test case to verify java.util.logging functionality works correctly on Scala.js

Verification:

  • All existing AirSpec tests continue to pass on both JVM and JS platforms
  • New test specifically exercises java.util.logging APIs to ensure the dependency is working
  • Confirmed the dependency is now properly included in the airspecJS module dependencies

Fixes #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.

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 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
@Copilot Copilot AI requested a review from xerial August 13, 2025 05:20
Copilot finished work on behalf of xerial August 13, 2025 05:20
The test uses java.util.logging which is not available in Scala Native,
so it needs to be in a JS-specific source directory.
@xerial xerial marked this pull request as ready for review August 13, 2025 05:44
@xerial xerial merged commit 6c25761 into main Aug 13, 2025
37 of 38 checks passed
@xerial xerial deleted the copilot/fix-4006 branch August 13, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AirSpec: Missing dependency on Scala.js: org.scala-js:scalajs-java-logging
2 participants