Thank you for your interest in contributing to Bengal STM! This document provides guidelines and information for contributors.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
Before creating an issue, please check if a similar issue already exists. When reporting bugs, include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Scala version, Java version, and Bengal STM version
- Minimal code example if applicable
Feature suggestions are welcome! Please provide:
- A clear description of the feature
- The problem it solves or use case it enables
- Any implementation ideas you have
- Fork the repository and create your branch from
main - Write tests for any new functionality
- Ensure all tests pass by running
sbt +test(cross-build) - Format your code by running
sbt scalafmtAll - Update documentation if you're changing public APIs
- Submit a pull request with a clear description of your changes
- Java 21 or later
- sbt
Bengal STM is cross-compiled for Scala 2.13 and Scala 3. Always use the + prefix to run commands against both Scala versions:
# Compile for both Scala 2.13 and 3
sbt +compile
# Run tests for both Scala versions
sbt +test
# Format code
sbt scalafmtAll
# Check formatting
sbt scalafmtCheckAllTo target a single Scala version during development:
sbt "++ 2.13.16" test
sbt "++ 3.3.4" testThis project uses Scalafmt for code formatting. Configuration is in .scalafmt.conf.
Key conventions:
- Follow existing code patterns and style
- Use meaningful names for variables, methods, and classes
- Add comments for complex logic
- Prefer immutability and functional patterns
- All new features should include tests
- Bug fixes should include a test that would have caught the bug
- Tests are located in
src/test/scala - Run tests with
sbt test
By contributing to Bengal STM, you agree that your contributions will be licensed under the Apache License 2.0.
If you have questions about contributing, feel free to open an issue for discussion.