Closed MasseGuillaume closed 8 years ago
oh ops I will rebase with: "scala-trace-debug" %% "scala-trace-debug" % "0.1.1"
oh ok you got it into master.
here you go ;-)
"If you use groupID %% artifactID % revision rather than groupID % artifactID % revision (the difference is the double %% after the groupID), sbt will add your project’s Scala version to the artifact name."
This is not what I want. If you have Scala version 2.10 and you do "scala-trace-debug" %% "scala-trace-debug" % "0.1.1", the project will not work - the traceExpression and assertExpression features requires scala version 2.11
If you really want to help, there are two things that I think need to be done, one big and one small. The small thing is to replace the example of traceExpression at the bottom of the README with a screenshot showing the use of traceExpression and assertExpression. The big thing is that there is a design flaw.
The design flaw is that printing, tracing, and asserting are all in one big implicit class and you can't selectively decide to include only printing or only tracing. It needs to be re-factored into three separate implicit classes. Once the big implicit class is split into three, each needs to be put into a separate file. One file for ImplicitTrace, one for ImplicitAssert, and one for ImplicitPrint. If the user chooses to import one of the three files, they get only that methods in that one implicit class. Once the implicit classes are moved out of the package object named "debug", that package object needs implicit conversion methods so that people who want to import all three at the same time can do so.
If the user imports the package object, they import the three implicit conversion methods and those methods apply the implicit conversions. "import info.collaborationstation.debug." must still produce an "all you can eat buffer" of implicit methods, but "import info.collaboration_station.debug.ImplicitTrace", "import info.collaboration_station.debug.ImplicitAssert", and "import info.collaboration_station.debug.ImplicitPrint" should allow the user to selectively import just trace, just assert, or just println.
Make that three things if you include issue https://github.com/JohnReedLOL/scala-trace-debug/issues/2
if you use % "name_2.11" it will fail at runtime if you are not using scala 2.11. If you use %% and scala 2.10, it will fail in sbt with a resolver failure.
My bad. change accepted
I cannot accept this pull request because copy-pasting this:
into my build.sbt file did not work. I had to instead do this:
Thank you