Skip to content
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

UnsupportedOperationException: empty.max #163

Open
alexandru opened this issue Aug 10, 2020 · 4 comments
Open

UnsupportedOperationException: empty.max #163

alexandru opened this issue Aug 10, 2020 · 4 comments

Comments

@alexandru
Copy link

Hey,

Trying to use this plugin, and unfortunately I've bumped into an issue — see build:

[error] java.lang.UnsupportedOperationException: empty.max
[error] 	at scala.collection.TraversableOnce.max(TraversableOnce.scala:234)
[error] 	at scala.collection.TraversableOnce.max$(TraversableOnce.scala:232)
[error] 	at scala.collection.AbstractTraversable.max(Traversable.scala:108)
[error] 	at net.bzzt.reproduciblebuilds.Certification$.apply(Certification.scala:118)
[error] 	at net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin$.$anonfun$ourCertification$1(ReproducibleBuildsPlugin.scala:61)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] 	at sbt.Execute.work(Execute.scala:290)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (packagedArtifacts) java.lang.UnsupportedOperationException: empty.max
[error] Total time: 84 s (01:24), completed Aug 10, 2020 8:37:49 PM
##[error]Process completed with exit code 1.

Any ideas?

Thanks,

@raboof
Copy link
Owner

raboof commented Aug 11, 2020

Hmm, this looks like it was triggered by running the reproducible builds plugin on a (sub)project that has no artifacts.

The workaround is probably to disable the plugin for that (sub)project.

The fix would probably be to not add a certification to (sub)projects without artifacts - after all, there's nothing to certify, right?

@alexandru
Copy link
Author

Yes, that's what I did, seems to be working.

@alexandru
Copy link
Author

Error message is confusing. As a suggestion, maybe trigger an exception that suggests a fix.

Very useful plugin btw, thanks.

@raboof
Copy link
Owner

raboof commented Aug 11, 2020

Error message is confusing. As a suggestion, maybe trigger an exception that suggests a fix.

Yeah that's definitely an oversight - suggesting a fix in the exception would be a useful first step, but just handling this situation in the plugin in the first place would be good too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants