The project is implemented under the Scala version 3.3.4, however newer versions should work just as fine! Check out the official Getting started guide on how to install Scala and sbt.
Additionally, our testing suite makes use of two Python3 packages: lit and filecheck.
You can contribute to the project by submitting a PR. We are currently setting up a Zulip channel to allow for a more direct communcation with us.
The 'sbt run' command allows you to run your main classes in the project. This can be helpful in ad-hoc exploration of the compiler framework, or some localised testing as you are implementing new features (although we do recommend a proper testing suite once the the feature is ready for use).
To use the command you would need to have defined a new main class somewhere in the project. By default, we have no main classes, and as such the command will result in an error.
sbt run
Once your changes are ready to be merged ensure that both unit tests, as well as MLIR compatibility tests are passing. PRs will be blocked from merging otherwise.
sbt test
sbt filechecks
sbt testAll
ScaIR project makes use of an auto-formatter, and some CI/CD checks on GitHub will fail if the code is not formatted properly. Once you are ready to submit a PR for merging, run the following sbt command to automatically format the entire code base:
sbt scalafmtAll
Additionally, we enforce that all unused imports be removed, automatic CI/CD checks will fail otherwise. To check for unused imports run the following sbt command:
sbt "scalafixAll --check"