Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retronym/boxer
https://github.com/retronym/boxer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/retronym/boxer
- Owner: retronym
- License: other
- Created: 2013-03-31T11:36:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T13:34:06.000Z (over 4 years ago)
- Last Synced: 2024-10-14T15:35:25.939Z (2 months ago)
- Language: Scala
- Size: 53.7 KB
- Stars: 47
- Watchers: 13
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Boxer: a demo scalac plugin, embedded in your SBT project.
Ever wish you could inject some extra analysis into the
compiler pipeline for your project? You could write a compiler
plugin, package, distribute it, and depend on it, but the
activation energy for that is pretty high.`Boxer` shows you how to embed a custom compiler plugin
directly into a sub-project of your SBT project. With this
in place, you can edit the plugin, run compile, and *immediately*
see the results in the context of your project.### What's inside
- [SBT Project Definition](https://github.com/retronym/boxer/blob/master/project/build.scala)
- Compiler Plugin [Descriptor](https://github.com/retronym/boxer/blob/master/plugin/src/main/resources/scalac-plugin.xml) and
[Sources](https://github.com/retronym/boxer/blob/master/plugin/src/main/scala/demo/DemoPlugin.scala)The Scala version used is 2.12.x, but the same code also works in
2.11.x.### Sample Output
[info] Compiling 1 Scala source to /Users/jason/code/boxer/plugin/target/scala-2.12/classes...
[info] Packaging /Users/jason/code/boxer/plugin/target/scala-2.12/boxer_2.12-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Compiling 1 Scala source to /Users/jason/code/boxer/main/target/scala-2.12/classes...
[warn] /Users/jason/code/boxer/main/src/main/scala/demo/Demo.scala:8: Value class `Meter` instantiated!
[warn] println(m2)
[warn] ^
[warn] one warning found