We are still figuring out the Maven Central repository publication process.
ScaIR is usable now through local publication though:
- Clone the repository and publish its packages locally by running:
./mill _.publishLocal
Which should end with a line like:
[625] Publishing Artifact(io.github.edin-dal,gen_dialects_3,<version>) to ivy repo <USER-PATH>/.ivy2/local
To use this from your project, just add:
- SBT:
libraryDependencies += "io.github.edin-dal" %% "scair" % "<version>"
- Mill:
def ivyDeps = Agg(
...,
"io.github.edin-dal::tools:<version>",
...
)
to your build defintion (Typically build.sbt
or build.mill
)
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 './mill 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.
# No main class specified or found!
./mill run
# To run the main CLI:
./mill tools.run
# To run the titlegen:
./mill clair.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. Our testing suite makes use of two Python3 packages: lit and filecheck.
./mill test
./mill filechecks
./mill 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. Additionally, we enforce that all unused imports be removed, automatic CI/CD checks will fail otherwise. Once you are ready to submit a PR for merging, run the following ./mill command to automatically format the entire code base:
./mill formatAll
To verify that the code has indeed been formatted, run:
./mill checkFormatAll