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
Cross compilation Scala 2.13 #236
Conversation
cb37a30
to
b09ef12
Compare
1026500
to
287a2cf
Compare
287a2cf
to
ef177bb
Compare
- tests | ||
- deploy | ||
- microsite | ||
- test |
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.
Where are the jobs for this stage defined? I'm also a bit confused by the script
above. When does that run?
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.
Without being an expert, I believe that test
is reserved for the script section. TBH, it's the only way I made it work with the help of @fedefernandez .
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.
Test is the default one, yes. It's a bit confusing though
case Comparison.CompareBoth(x, y) => Comparison.CompareBoth(f(x), f(y)) | ||
case Comparison.CompareList(i, rep) => Comparison.CompareList(i.map(f), rep) | ||
case Comparison.MatchInList(a, rep) => Comparison.MatchInList(a.map(f), rep) | ||
case Comparison.AlignUnionMembers(a, rep) => Comparison.AlignUnionMembers(a.view.mapValues(_.map(f)).toMap, rep) |
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.
It took me a while to spot the difference 😄
|
||
package higherkindness.skeuomorph.openapi | ||
|
||
trait OperationHelpers { |
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.
Rename this file to OperationHelpers.scala
?
import schema._ | ||
|
||
def operationWithReferences[A](request: Reference, responses: (String, Reference)*): Path.Operation[A] = | ||
operationFrom(request.asRight.some, responses.toMap.view.mapValues(_.asRight).toMap) |
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.
Did you try scala-collection-compat? I think it will allow us to write .view.mapValues.toMap
in Scala 2.12, so we don't need to duplicate files.
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.
👍 , a fair bit of duplicated code, I would have expected cross compilation to be a bit smoother
@cb372 Thanks for the suggestion! Ready for another look :) CC @BenFradet |
This PR cross-compile the project with Scala 2.13.