8000 Fix default value of --direction in CLI by retronym · Pull Request #138 · lightbend-labs/mima · GitHub
[go: up one dir, main page]

Skip to content

Fix default value of --direction in CLI #138

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

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

retronym
Copy link
Contributor

Since 2844ffa, running MiMa from the CLI has been a no-op unless
the new option --direction backwards was provided. Only the SBT
plugin correctly used the default value.

Noticed in the SBT build of Scala on the 2.12.x branch, where
we use MiMa be calling Main.main from our build for some reason,
rather than using the SBT plugin directly.

This commit restores the old behaviour when that parameter is
missing, as manually tested with:

% sbt reporter/runMain com.typesafe.tools.mima.cli.Main --prev /Users/jz/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-RC1.jar --curr /Users/jz/code/scala/build/pack/lib/scala-library.jar

[info] Compiling 1 Scala source to /Users/jz/code/migration-manager/reporter/target/scala-2.10/classes...
[info] Running com.typesafe.tools.mima.cli.Main --prev /Users/jz/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-RC1.jar --curr /Users/jz/code/scala/build/pack/lib/scala-library.jar
Found 13 binary incompatibilities
=================================
 * method TRAIT_SETTER_SEPARATOR_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method NAME_JOIN_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method SETTER_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method LAZY_LOCAL_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method LOCAL_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method MODULE_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method MODULE_INSTANCE_NAME()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method loadFactorDenum()Int in object scala.collection.mutable.HashTable
   does not have a correspondent in current version
 * method printSizeMap()Unit in interface scala.collection.mutable.HashTable
   does not have a correspondent in current version
 * method findEntry0(java.lang.Object,Int)scala.collection.mutable.HashEntry
   in interface scala.collection.mutable.HashTable is present only in current
   version
 * method addEntry0(scala.collection.mutable.HashEntry,Int)Unit in interface
   scala.collection.mutable.HashTable is present only in current version
 * method foo()Int in interface scala.collection.mutable.HashTable is
   present only in current version
 * method isJavaAtLeast(Int)Boolean in interface scala.util.PropertiesTrait
   is present only in current version

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-6"
java.lang.RuntimeException: Nonzero exit code: 13
    at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last reporter/compile:runMain for the full output.
[error] (reporter/compile:runMain) Nonzero exit code: 13
[error] Total time: 2 s, completed 16/11/2016 3:36:25 PM

Fixes #137

8000
Since 2844ffa, running MiMa from the CLI has been a no-op unless
the new option `--direction backwards` was provided. Only the SBT
plugin correctly used the default value.

Noticed in the SBT build of Scala on the 2.12.x branch, where
we use MiMa be calling `Main.main` from our build for some reason,
rather than using the SBT plugin directly.

This commit restores the old behaviour when that parameter is
missing, as manually tested with:

```
% sbt reporter/runMain com.typesafe.tools.mima.cli.Main --prev /Users/jz/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-RC1.jar --curr /Users/jz/code/scala/build/pack/lib/scala-library.jar

[info] Compiling 1 Scala source to /Users/jz/code/migration-manager/reporter/target/scala-2.10/classes...
[info] Running com.typesafe.tools.mima.cli.Main --prev /Users/jz/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.0-RC1.jar --curr /Users/jz/code/scala/build/pack/lib/scala-library.jar
Found 13 binary incompatibilities
=================================
 * method TRAIT_SETTER_SEPARATOR_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method NAME_JOIN_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method SETTER_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method LAZY_LOCAL_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method LOCAL_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method MODULE_SUFFIX_STRING()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method MODULE_INSTANCE_NAME()java.lang.String in object
   scala.reflect.NameTransformer is declared final in current version
 * method loadFactorDenum()Int in object scala.collection.mutable.HashTable
   does not have a correspondent in current version
 * method printSizeMap()Unit in interface scala.collection.mutable.HashTable
   does not have a correspondent in current version
 * method findEntry0(java.lang.Object,Int)scala.collection.mutable.HashEntry
   in interface scala.collection.mutable.HashTable is present only in current
   version
 * method addEntry0(scala.collection.mutable.HashEntry,Int)Unit in interface
   scala.collection.mutable.HashTable is present only in current version
 * method foo()Int in interface scala.collection.mutable.HashTable is
   present only in current version
 * method isJavaAtLeast(Int)Boolean in interface scala.util.PropertiesTrait
   is present only in current version

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-6"
java.lang.RuntimeException: Nonzero exit code: 13
    at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last reporter/compile:runMain for the full output.
[error] (reporter/compile:runMain) Nonzero exit code: 13
[error] Total time: 2 s, completed 16/11/2016 3:36:25 PM
```

Fixes lightbend-labs#137
@retronym
Copy link
Contributor Author

Review by @SethTisue

@ktoso
Copy link
Contributor
ktoso commented Nov 16, 2016

Thanks for spotting this @retronym !
Should we release with this fix?

Copy link
Contributor
@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dwijnand
Copy link
Collaborator

👍 for releasing early and often

@SethTisue SethTisue merged commit 0da3b46 into lightbend-labs:master Nov 16, 2016
@SethTisue SethTisue added this to the 0.1.12 milestone Nov 16, 2016
@SethTisue
Copy link
Collaborator

👍 for releasing early and often

sadly, a lot of the release stuff is not very automated, so it can actually take a couple hours of work. I made #140 with a checklist of steps.

but! there are open issues at https://github.com/typesafehub/migration-manager/milestone/9. @jvican says he's working on #136, and #135 seems like it could merit a fix before releasing.

@retronym
Copy link
Contributor Author

FTR we have a workaround in the Scala build, so this isn't urgent for us. But we shouldn't let this known bug persist for more than, say, a week.

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

Successfully merging this pull request may close these issues.

4 participants
0