When cross-building is enabled, the code is generated only for one version
See original GitHub issueIn my SBT project, my main Scala version is set to 2.11.8, but because I am also using Spark, I set up my project for cross-building for 2.10.6 and 2.11.8.
However, the +avro:generate-specific
(the plus for crossbuild mode) puts the generated Scala code to target/scala-2.10/src_managed/main/compiled_avro
. I manually have to copy it to the respective scala_2.11
folder.
Without the copying, a sbt +compile
works, but when using the project in Eclipse, I manually have to add the 2.10 folder to my project, otherwise it shows a lot of compiler errors.
Is it possible to tell the plugin to output the generated code to both directories?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Cross building — conan 1.55.0 documentation
Cross building (or cross compilation) is the process of generating binaries for a platform that is not the one where the compiling process...
Read more >CrossBuildPackagingGuidelines - Debian Wiki
Guidelines for cross-build friendly packages. This page describes good (and bad) practice in packaging (and upstream code) with respect to ...
Read more >sbt Reference Manual — Cross-building
This page describes how to use sbt to build and publish your project against multiple versions of Scala and how to use libraries...
Read more >Cross Building - Link SDK - Alibaba Cloud Documentation Center
Cross Building,Link SDK:In this chapter, a complete cross-building process is shown by compiling the SDK on arm-Linux platform as an example.
Read more >Cross compiler - Wikipedia
A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ve been having this issue where sometimes the 2.12 compilation would run first and things would succeed (Scala 2.13 seems to be happy compiling with the 2.12 code) but the other way around things fail (2.12 is very unhappy about compiling with 2.13 code).
I tracked this down to the file caching done here - https://github.com/julianpeeters/sbt-avrohugger/blob/main/src/main/scala/sbtavrohugger/SbtAvrohugger.scala#L65
The files are cached when the first version finishes compiling and the other versions just don’t bother since the cache says it’s all good. I hope the fix is just using
crossTarget
instead (looks like it’s work locally) - https://github.com/julianpeeters/sbt-avrohugger/pull/88https://github.com/julianpeeters/sbt-avrohugger/pull/88