golem-scala-development

Compiles, tests, and publishes the Golem Scala SDK and its sbt and Mill plugins.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-scala-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-scala-development
Source: https://github.com/golemcloud/golem/tree/main/.agents/skills/golem-scala-development
Command: npx skills add https://github.com/golemcloud/golem --skill golem-scala-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developing the Golem Scala SDK requires navigating a complex multi-version build matrix (Scala 3.8.2, 2.12.21, sbt, Mill) that is independent of the repository's Rust build, and mistakes in project IDs, publication order, or WIT synchronization cause confusing failures.

Core Features & Use Cases

  • Build and Test Guidance: Provides the authoritative sbt commands, project IDs (core, macros, codegen, sbtPlugin, testAgents), and Scala version switches for compiling and testing SDK modules.
  • Local Publication: Documents the canonical sbt golemPublishLocal flow and the repository-wide cargo make build-sdk-scala prerequisite pipeline including WIT sync and guest runtimes.
  • Runtime and WIT Changes: Points to authoritative sources like HostApi.scala, DurabilityApi.scala, and wit/main.wit when modifying the Scala.js host surface or regenerating guests.
  • Use Case: When changing a public API in the Scala SDK, follow the skill to compile affected projects, run macro and codegen tests, link testAgents, and publish locally before building the standalone example consumer.

Quick Start

Ask the assistant to compile and test the Golem Scala SDK core module with sbt using Scala 3.8.2 and then publish it locally.

Frequently Asked Questions about golem-scala-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and test the Golem Scala SDK?

Run sbt commands from sdks/scala using explicit Scala versions, such as sbt "++3.8.2; core/compile" or sbt "++3.8.2; modelJVM/test; modelJS/test". The aggregate alias sbt golemTestAll covers Scala 3 model, core, and macros tests plus linking testAgents.

How do I publish the Golem Scala SDK locally?

Run sbt golemPublishLocal from the sdks/scala directory. For the full repository prerequisite flow including WIT sync and all guest runtimes, run cargo make build-sdk-scala from the repository root instead.

Which Scala versions does the Golem Scala SDK support?

SDK modules and the Mill plugin build use Scala 3.8.2, while Scala 2.12.21 is used only for sbt 1.x plugin loading and its shared codegen dependency. Scala 2 applications are not supported.

Does cargo make build compile the Scala SDK?

No, the Scala SDK is independent of the root Rust build and cargo make build does not compile it. Use sbt directly in sdks/scala or the dedicated cargo make build-sdk-scala task for the full local publication flow.

Why does the Scala SDK build fail after WIT changes?

WIT or guest-role changes require resynchronizing and regenerating guests as described by the golem-scala-base-image flow, which uses wasm-rquickjs 0.4.2, Preview 3, and wasm32-wasip2. Delete the .local-publish-marker file before rerunning the cargo-make task when inputs changed.