Development guidelines for wvlet/airframe - Essential Building Blocks for Scala. Covers multi-platform builds (JVM/JS/Native), sbt workflows, testing with AirSpec, and contribution standards.
Development guidelines for the wvlet/airframe project - Essential Building Blocks for Scala. This skill provides coding standards, testing practices, and workflow patterns for contributing to the Airframe ecosystem.
- JVM: `.jvm/src/main/scala`, `.jvm/src/test/scala`
- JS: `.js/src/main/scala`, `.js/src/test/scala`
- Native: `.native/src/main/scala`, `.native/src/test/scala`
- Shared code (common to all platforms) resides in `src/main/scala` and `src/test/scala`
1. **Formatting**: Before committing changes, run `./sbt scalafmtAll` to properly format the Scala code according to project guidelines. For targeted formatting of specific modules, use `./sbt "(moduleNameJVM)/scalafmtAll"` (replace `moduleNameJVM` with your target module)
2. **Case Classes**: Configuration case classes should have `withXXX(...)` methods for all fields and `noXXX(...)` methods for all optional fields
3. **String Interpolation**: Always enclose expressions with brackets `${...}` for consistency
4. **Error Handling**: Returning `Try[A]` is generally discouraged as it forces a monadic style on the caller. Consider using plain exceptions for unrecoverable errors, or domain-specific error types
- Ensure it's available for all relevant platforms (JVM, JS, Native) if the module is cross-built
- Prefer libraries already used in other modules if similar functionality is needed
- For `airframe-core`, new dependencies are highly discouraged
- JVM: `./sbt projectJVM/Test/compile`
- JS: `./sbt projectJS/Test/compile`
- Native: `./sbt projectNative/Test/compile`
- Replace `project` with the actual module name (e.g., `logJVM/Test/compile`)
- Example for JVM test in `airframe-log` module: `./sbt 'logJVM/testOnly *MyLogTest'`
- Example for JS test in `airframe-codec` module: `./sbt 'codecJS/testOnly fully.qualified.TestClassName'`
- `fix/$(date +"%Y%m%d_%H%M%S")-brief-description`
- `doc/$(date +"%Y%m%d_%H%M%S")-brief-description`
- `internal/$(date +"%Y%m%d_%H%M%S")-brief-description`
Format: `feature: xxx` (for new features), `fix` (bug fixes), `internal` (non-user facing changes), or `doc` based on the code change contents
Focus on the **why** part of the change, not **what** or **how**:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/airframe-scala-development-p9i0zq/raw