build: Cross-compile to Scala 2.13
Related Issues/PRs
Builds on https://github.com/microsoft/SynapseML/pull/1771
What changes are proposed in this pull request?
Make cross-compilation to Scala 2.12 and 2.13 work.
How is this patch tested?
Using sbt test:compile && sbt ++2.13.10 test:compile without issues.
Does this PR change any dependencies?
- [x] Yes. Make sure the dependencies are resolved correctly, and list changes here.
Shapeless was a transitive dependency before and resolved to
2.3.2. This version does not have a Scala 2.13 build, so I added2.3.4explicitly which is the first version that does.
Does this PR add a new feature? If so, have you added samples on website?
- [x] No. You can skip this section.
Hey @nightscape :wave:! Thank you so much for contributing to our repository :raised_hands:. Someone from SynapseML Team will be reviewing this pull request soon.
We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix. This helps us to create release messages and credit you for your hard work!
Examples of commit messages with semantic prefixes:
-
fix: Fix LightGBM crashes with empty partitions -
feat: Make HTTP on Spark back-offs configurable -
docs: Update Spark Serving usage -
build: Add codecov support -
perf: improve LightGBM memory usage -
refactor: make python code generation rely on classes -
style: Remove nulls from CNTKModel -
test: Add test coverage for CNTKModel
To test your commit locally, please follow our guild on building from source. Check out the developer guide for additional guidance on testing your change.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Codecov Report
Merging #1772 (ce81ea8) into master (6143514) will decrease coverage by
1.34%. The diff coverage is67.50%.
@@ Coverage Diff @@
## master #1772 +/- ##
==========================================
- Coverage 83.21% 81.86% -1.35%
==========================================
Files 278 278
Lines 14722 14724 +2
Branches 767 762 -5
==========================================
- Hits 12251 12054 -197
- Misses 2471 2670 +199
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...e/synapse/ml/cognitive/vision/ComputerVision.scala | 90.37% <0.00%> (ø) |
|
| .../azure/synapse/ml/geospatial/AzureMapsTraits.scala | 70.90% <ø> (ø) |
|
| ...oft/azure/synapse/ml/nn/BoundedPriorityQueue.scala | 86.66% <ø> (ø) |
|
| ...ft/azure/synapse/ml/automl/HyperparamBuilder.scala | 45.45% <0.00%> (ø) |
|
| ...ft/azure/synapse/ml/core/env/StreamUtilities.scala | 85.18% <ø> (ø) |
|
| ...osoft/azure/synapse/ml/param/TypedArrayParam.scala | 50.00% <0.00%> (ø) |
|
| ...cala/org/apache/spark/ml/NamespaceInjections.scala | 100.00% <ø> (ø) |
|
| ...che/spark/sql/execution/streaming/HTTPSource.scala | 0.00% <0.00%> (-90.00%) |
:arrow_down: |
| .../execution/streaming/continuous/HTTPSourceV2.scala | 0.00% <0.00%> (-92.15%) |
:arrow_down: |
| .../microsoft/azure/synapse/ml/onnx/ONNXRuntime.scala | 73.52% <ø> (ø) |
|
| ... and 42 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@nightscape thanks for this PR, synapse-internal tests are down right now (not your fault) but Style looks like something that can be fixed
@nightscape can we also meet at some point to discuss what this change means for the jar publishing foot print. If you reach out to [email protected] we can set up a slot :)
Hi @mhamilton723, thanks for getting back so quickly! I just sent a mail to the address you posted above. Regarding your comment about improving the Style: Are you talking about some code quality check in the PR validation that I can take as a starting point, or just to improve the style generally? Some things in the PR read not so nicely because I needed to write them in a way that is compatible with 2.12 and 2.13, but maybe there's a way to make them nicer.
Hi @mhamilton723, thanks for getting back so quickly! I just sent a mail to the address you posted above. Regarding your comment about improving the Style: Are you talking about some code quality check in the PR validation that I can take as a starting point, or just to improve the style generally? Some things in the PR read not so nicely because I needed to write them in a way that is compatible with 2.12 and 2.13, but maybe there's a way to make them nicer.
I just meant the buid gate, you can run this locally with sbt scalastyle test:scalastyle
I only looked at the explainers, exploratory and onnx packages, and the changes looked good to me.
@mhamilton723 I fixed the Scalastyle issue and rebased on the latest master.
I almost forgot this: We're still blocked by isolation-forest not being released for Scala 2.13: https://github.com/linkedin/isolation-forest/pull/35
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
I almost forgot this: We're still blocked by isolation-forest not being released for Scala 2.13: linkedin/isolation-forest#35
Just messaged the maintainer to ask him to take a look at this!
A Scala 2.13 version of isolation-forest has been released. We're ready to proceed!
The error in the build is because of isolation forest, makign the changes i suggested should remove that blocker
@mhamilton723 I created a separate PR for the dependency update https://github.com/microsoft/SynapseML/pull/1776
Hey, folks. It seems that isolation-forest dependency has been upgraded in master separately. Can anyone please give this issue another try?