Permalink
Commits on Dec 1, 2016
  1. Merge pull request #149 from retronym/ticket/147

    Avoid false positives for classes defined in methods
    szeiger committed on GitHub Dec 1, 2016
Commits on Nov 30, 2016
  1. Avoid false positives for classes defined in methods

    If a class has the `EnclosingMethod` attribute, we know it was defined
    in the body of a method (or a val/var initializer), and is not part of
    the API of a class.
    
    Fixes #147
    retronym committed Nov 30, 2016
  2. Merge pull request #143 from szeiger/issue/127-removing-inner-object

    Detect changes to inner modules
    szeiger committed on GitHub Nov 30, 2016
  3. Exploring inner modules for binary incompatibilities. Fix #127

    The former implementation of PackageInfo#accessibleClasses expects that for any
    module `Foo` compiled by scalac, both `Foo.class` and `Foo$.class` classfiles
    are produced. Because `Foo$.class` and `Foo.class` are essentially mirrors, and
    users never access directly `Foo$.class`, MiMa only traverses the `Foo.class`. This
    works well for top-level modules, but it breaks for inner modules, because no
    mirror class is created for inner modules (only the module class is created).
    
    The fix consist in treating inner modules differently, hence making sure inner
    modules are part of the set returned by PackageInfo#accessibleClasses.
    dotta committed with szeiger Oct 1, 2016
Commits on Nov 29, 2016
  1. Merge pull request #145 from szeiger/issue/136

    Treat default value getters as accessible.
    adriaanm committed on GitHub Nov 29, 2016
  2. Merge pull request #142 from retronym/topic/java-statics

    Add support for Java-defined static members
    szeiger committed on GitHub Nov 29, 2016
  3. Add support for Java-defined static members

    We can reliably/simply determine whether a class if from scalac
    by the presence/absense of Scala/ScalaSig attributes. With this
    knowledge, we can include static methods from non Scala classfiles
    into MiMa's purview.
    
    I've added specific code to warn about static <-> non-static changes,
    which aren't binary compatible. In addition, the existing rules will
    now run for these members.
    
    In order to make this work, we also need to skip static members in
    Scala classes after parsing attributes
    
    Two other problems discovered and fixed while implementing this:
    
    - `Members.members` is only a `TraversableOnce` which is traversed in
      the constructor. It should not be exposed as a field.
    
    - The now inlined methods `parseFields` and `parseMethods` in
      `ClassfileParser` did not always skip the members in the class file
      even though attributes have to be parsed in all cases afterwards.
    
    Co-Authored-By: Stefan Zeiger <szeiger@novocode.com>
    retronym committed Nov 17, 2016
Commits on Nov 28, 2016
  1. Merge pull request #146 from szeiger/wip/build-improvements

    Make life easier for developers
    szeiger committed on GitHub Nov 28, 2016
Commits on Nov 24, 2016
  1. Make life easier for developers

    - Ignore .idea dirs (there’s already a bunch of Eclipse-specific
      patterns in .gitignore)
    
    - Require that test dirs contain a “problems.txt” file. When switching
      between branches with different tests, you’re left with empty dirs
      under reporter/src/test. They used to be picked up as tests (which
      subsequently failed because they are not).
    szeiger committed Nov 24, 2016
Commits on Nov 23, 2016
  1. Treat default value getters as accessible.

    They are called from other compilation units and their names can change
    when a new overload is added to a method with default values.
    
    Fixes #136.
    szeiger committed Nov 23, 2016
  2. Merge pull request #144 from szeiger/issue/135

    Do not skip extension methods.
    szeiger committed on GitHub Nov 23, 2016
Commits on Nov 22, 2016
  1. Merge pull request #141 from SethTisue/remove-deprecated-keys

    remove deprecated stuff
    szeiger committed on GitHub Nov 22, 2016
Commits on Nov 21, 2016
  1. Do not skip extension methods.

    They are classified as “has a synthetic name” (i.e. contains a “$”) but
    regular use of these methods generates calls to the names from other
    compilation units.
    
    Fixes #135.
    szeiger committed Nov 21, 2016
Commits on Nov 16, 2016
  1. remove deprecated stuff

    these keys have been deprecated since 0.1.9
    
    fixes #134
    SethTisue committed Nov 16, 2016
  2. Merge pull request #139 from szeiger/wip/class-method-concrete-overri…

    …de-of-concrete-supertrait-method
    
    Add test case class-method-concrete-override-of-concrete-supertrait-method
    SethTisue committed on GitHub Nov 16, 2016
  3. Merge pull request #138 from retronym/topic/blind

    Fix default value of --direction in CLI
    SethTisue committed on GitHub Nov 16, 2016
  4. Fix default value of --direction in CLI

    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
    retronym committed Nov 16, 2016
Commits on Oct 20, 2016
  1. Revert "re-enable -Xfatal-warnings for the build definition"

    This reverts commit 971ec1e.
    
    Sigh.  This works fine locally, but fails in the community build because
    when dbuild monkeys with the build it uses <<=
    
    I will report the issue on dbuild
    SethTisue committed Oct 20, 2016
Commits on Oct 19, 2016
  1. Merge pull request #131 from SethTisue/bump-scala-versions

    be 2.12.0-RC2 compatible
    SethTisue committed on GitHub Oct 19, 2016
  2. updated expected test results for 2.12.0-RC2 changes

    fixes com.typesafe.tools.mima.lib.TestFailed on
    test-class-method-abstract-override-of-concrete-supertrait-method-nok
    
    conferred with Adriaan on this. it looks like this is because of the
    restoration of mixin forwarders in RC2. so we just update the expected
    output to match the new behavior. (this makes the 2.12 expected
    output the same as the 2.11 output again, so we just remove the
    2.12-specific file.)
    SethTisue committed Oct 19, 2016
  3. set sbt options in .sbtopts not only .travis.yml

    without this I was having trouble running tests locally, for lack
    of heap
    SethTisue committed Oct 19, 2016
  4. silence some compiler warnings

    SethTisue committed Oct 19, 2016
  5. Merge pull request #129 from JoshRosen/synchronize-parse-method

    Synchronize ClassfileParser.parse() in attempt to prevent parsing errors in concurrent runs
    SethTisue committed on GitHub Oct 19, 2016
  6. Merge pull request #130 from dwijnand/build

    Upgrade to sbt 0.13.13-RC3
    2m committed on GitHub Oct 19, 2016
Commits on Oct 18, 2016
  1. Upgrade to sbt 0.13.13-RC3

    Migrate from the Build trait, the fishbone operators and tuple enrichment syntax.
    dwijnand committed Oct 18, 2016
Commits on Oct 6, 2016
Commits on Sep 29, 2016
  1. Merge pull request #123 from szeiger/wip/scala-2.12

    Add Scala 2.12 support
    szeiger committed on GitHub Sep 29, 2016