Skip to content
macro validations for common string like constructs
Scala
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
project
README.md

README.md

scala-validations

usage screenshot

Add some additional compile time checks with macros.

This project no longer reflects the blog post Scala Macros that won’t kill you, go to the old version to see that code.

I welcome all patches, pull requests, Issues, and Comments!

If you use this libray, I'd love to hear about it!

Using scala-validations

If you are using maven, the easiest way to use this project is to add

<dependency>
	<groupId>scala-validations</groupId>
	<artifactId>scala-validations</artifactId>
	<version>0.1.0-SNAPSHOT</version>
</dependency>

and

<repositories>
	<repository>
		<id>tptpParser-mvn-repo</id>
		<url>https://raw.github.com/marklemay/scala-validations/mvn-repo/</url>
		<snapshots>
			<enabled>true</enabled>
			<updatePolicy>always</updatePolicy>
		</snapshots>
	</repository>
</repositories>

to your pom.xml. Right now I use the poor man's repo method. If there's enough intrest, I'll push to Maven Central.

You can also make your project directly dependent on the binary jar or the source jar.

See the example project for usage.

You can always postpone the compile time checks to runtime by changing the import from

import validation.compiletime.ClassPath._

to

import validation.runtime.ClassPath._

This will remove the custom compile time warnings and errors.

You may need to turn off "implicit underlining" in eclipse scala ide to see the error underlines in all their glory.

Committing

I would love contributions!

There are 2 maven project in this repo

The project should work fine with the scala 2.11 IDE without any further configuration.

TODOs

  • blog about methodology
  • sbt testing
  • sbt documentation
  • tests
  • push to maven central if there's enough intresr
You can’t perform that action at this time.