Comments (3)
I can't reproduce the error in my environment. Are you using the latest 0.8.5? I noticed that you're using *.scala build file. Is PathList
in the scope?
from sbt-assembly.
Hmm, I am getting the same error with 0.8.6 and Scala 2.9.2/sbt 0.12. Here are the settings:
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("org", "apache", "commons", "collections", "bidimap", xs @ _*) => MergeStrategy.first
case x => old(x)
}
}
and here's the error:
[info] Compiling 1 Scala source to /Users/dragos.manolescu/Repos/monitoring-pipeline/xml-stats-poller/project/target/scala-2.9.2/sbt-0.12/classes...
[error] /Users/dragos.manolescu/Repos/monitoring-pipeline/xml-stats-poller/project/XmlStatsPollerBuild.scala:36: star patterns must correspond with varargs parameters
[error] Error occurred in an application involving default arguments.
[error] case PathList("org", "apache", "commons", "collections", "bidimap", xs @ _*) => MergeStrategy.first
[error] ^
[error] one error found
from sbt-assembly.
when @kul originally reported this bug I probably only tested this using build.sbt, and trusted that if a setting works in build.sbt, it would always work in build.scala.
it turns out that's not always the case! there's a bug in the pattern matcher pre-2.10 (SI-3488) that blows up when default parameters are used in conjunction with _*
. In this case, the default parameters are coming likely from Project.apply
.
The workaround is to separate out the settings into a method:
lazy val lib = Project("lib", file("lib"), settings = Defaults.defaultSettings ++ assemblySettings) settings(
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("org", "apache", "commons", "collections", "bidimap", xs @ _*) => MergeStrategy.first
case x => old(x)
}
}
)
from sbt-assembly.
Related Issues (20)
- Inconsistent merge strategy logging vs counts
- Logback does not work with รผber-JAR HOT 1
- Migrate to `com.github.sbt`? HOT 1
- Assembly no longer creating directories defined in assemblyOutputPath HOT 4
- executable jar args
- Concatenating files without a newline HOT 4
- META-INF/javax.annotation.processing.Processor is included empty when shading is enabled - log4j HOT 2
- Add setting to allow adding arbitrary files to output Jar HOT 1
- Merge error not comprehensible HOT 3
- Definition of a repeatable build HOT 1
- InvalidPathException on Assembly 2.1.1 HOT 13
- Current alternative to assembledMappings HOT 6
- Document log4j2 plugins custom merge strategy HOT 2
- sbt clean assembly fails
- issue with zip64 headers in jars generated using sbt-assembly HOT 1
- Files from project's sources overwrite merged dependencies (2.0.0 regression)
- Shading breaks META-INF/services (1.2.0 regression) HOT 1
- Exception thrown "pomProperties" is null
- Abort build if shading fails HOT 1
- question about Mappings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-assembly.