-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First steps to make a utils library #30
Conversation
Three subprojects: datetime, magic, combinators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!, great stuff! We should make sure we address the fact that the microsite no longers point to just one library but a utils based one with multiple modules. We should consider also renaming the repo.
@@ -2,10 +2,10 @@ import com.typesafe.sbt.SbtGhPages.ghpages | |||
import com.typesafe.sbt.SbtGit.git | |||
import de.heikoseeberger.sbtheader.HeaderPattern | |||
|
|||
lazy val buildSettings = Seq( | |||
lazy val commonSettings = Seq( | |||
organization := "com.fortysevendeg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting now and going forward we are gonna use com.47deg
as the org name and groupId for all libs going forward. Existing libs will be migrated over as next releases happen to bring all the OS 47 libs under the same groupId. Once you are ready to publish to sonatype and central, let @fedefernandez and I know and we'll let you when ready. We need to request the org with the first lib that makes there. /cc @andyscott
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this in place here and add a ticket to address this before any future releases
|
||
val magicStrings: Gen[String] = oneOf(strings) | ||
|
||
implicit val enhancedStringArbitrary: Arbitrary[String] = Arbitrary { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if for cases like this one where we are explicitly overriding the scalacheck default instance for Arbitrary[String]
an alternative approach would be to use tagged types so it's explicit that we are summoning the implicit for magic Strings. Arbitrary[String @@ Magic]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a think about this. In my head the reasoning is you want arbitrary String
s, and just have the added bonus benefit of checking some magic ones too. I see having an import to override the scalacheck default is essentially the same as tagging.
Thanks! Re the microsite changes, I'll do this in a separate PR before a release. |
Restructuring the project into three (four actually) distinct projects:
scalacheck-datetime
- the one we know and lovemagic
- inclusion of generators for "magic" strings (drop database STUDENTS
etc)combinators
- generators for common use-cases (ie, a map and a list of elements guaranteed to be in the map)docs
- the fourth project, which is for the Jekyll sitemagic
andcombinators
are still in a skeleton form for this PR.Also todo following this PR is the renaming in Github, docs and elsewhere to reflect use as a utils library rather than just datetime.
@raulraja would you be able to take a look please?