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

Add more details to the final error message #89

Open
lefou opened this issue Mar 3, 2023 · 0 comments
Open

Add more details to the final error message #89

lefou opened this issue Mar 3, 2023 · 0 comments

Comments

@lefou
Copy link
Collaborator

lefou commented Mar 3, 2023

When running mimaReportBinaryIssues on multiple modules, the final error messages don't give a clue about specific issues. E.g. when running a mill -k __.mimaReportBinaryIssues, which is a typical use case in CI, all I see at the end is:

3 targets failed
main.mimaReportBinaryIssues Failed binary compatibility check! Found 18 potential problems
main.api.mimaReportBinaryIssues Failed binary compatibility check! Found 6 potential problems
scalalib.mimaReportBinaryIssues Failed binary compatibility check! Found 1 potential problems (filtered 1)

This forces me to inspect the full build log (sometimes requires extra steps to download full history). Adding more details to this error messages would be very helpful. If you disagree, maybe, we can add some verbose option and default-enable it when the CI env variable is present. But honestly, I also want more details when building on my local machine. If there are too many details, we could limit it like we do it in tests and report some "and n more...", when CI is unset.

Here is a mockup of the envisioned detailed error messages:

3 targets failed
main.mimaReportBinaryIssues Failed binary compatibility check! Found 18 potential problems
 * class mill.MillConfig does not have a correspondent in current version
 * object mill.MillConfig does not have a correspondent in current version
 * class mill.MillConfigParser does not have a correspondent in current version
 * object mill.MillConfigParser does not have a correspondent in current version
 * synthetic static method createAssembly$default$2()mill.modules.Jvm#JarManifest in class mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * static method createAssembly(mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef in class mill.modules.Jvm's type is different in current version, where it is (mill.api.AggWrapper#Agg,mill.api.JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef instead of (mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef
 * static method createJar(os.Path,mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,scala.Function2)Unit in class mill.modules.Jvm in current version does not have a correspondent with same parameter signature among (os.Path,mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2)Unit, (mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef
 * synthetic static method createJar$default$2()mill.modules.Jvm#JarManifest in class mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * static method createJar(mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef in class mill.modules.Jvm in current version does not have a correspondent with same parameter signature among (os.Path,mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2)Unit, (mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef
 * static method createManifest(scala.Option)mill.modules.Jvm#JarManifest in class mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * method createManifest(scala.Option)mill.modules.Jvm#JarManifest in object mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * method createJar(mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef in object mill.modules.Jvm in current version does not have a correspondent with same parameter signature among (os.Path,mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2)Unit, (mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef
 * method createJar(os.Path,mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,scala.Function2)Unit in object mill.modules.Jvm in current version does not have a correspondent with same parameter signature among (os.Path,mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2)Unit, (mill.api.AggWrapper#Agg,mill.api.JarManifest,scala.Function2,mill.api.Ctx#Dest)mill.api.PathRef
 * synthetic method createJar$default$2()mill.modules.Jvm#JarManifest in object mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * method createAssembly(mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef in object mill.modules.Jvm's type is different in current version, where it is (mill.api.AggWrapper#Agg,mill.api.JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef instead of (mill.api.AggWrapper#Agg,mill.modules.Jvm#JarManifest,java.lang.String,scala.Option,scala.collection.immutable.Seq,mill.api.Ctx#Dest)mill.api.PathRef
 * synthetic method createAssembly$default$2()mill.modules.Jvm#JarManifest in object mill.modules.Jvm has a different result type in current version, where it is mill.api.JarManifest rather than mill.modules.Jvm#JarManifest
 * class mill.modules.Jvm#JarManifest does not have a correspondent in current version
 * object mill.modules.Jvm#JarManifest does not have a correspondent in current version
main.api.mimaReportBinaryIssues Failed binary compatibility check! Found 6 potential problems
 * static method unapply(mill.api.PathRef)scala.Option in class mill.api.PathRef does not have a correspondent in current version
 * method copy(os.Path,Boolean,Int)mill.api.PathRef in class mill.api.PathRef does not have a correspondent in current version
 * synthetic method copy$default$1()os.Path in class mill.api.PathRef does not have a correspondent in current version
 * synthetic method copy$default$2()Boolean in class mill.api.PathRef does not have a correspondent in current version
 * synthetic method copy$default$3()Int in class mill.api.PathRef does not have a correspondent in current version
 * method unapply(mill.api.PathRef)scala.Option in object mill.api.PathRef does not have a correspondent in current version
scalalib.mimaReportBinaryIssues Failed binary compatibility check! Found 1 potential problems 
 * abstract synthetic method mill$scalalib$ScalaModule$$super$mapDependencies()mill.define.Task in interface mill.scalalib.ScalaModule is present only in current version

I just removed the suggested filters to fix it, so the implementation should be easy, even if we only get strings from MiMa.

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

1 participant