Coder Social home page Coder Social logo

migration-manager's Introduction

Migration Manager for Scala

A tool for diagnosing migration problems for Scala libraries

The Migration Manager for Scala (MiMa in short) is a tool for diagnosing binary incompatibilities for Scala libraries.

If you don't know how to use MiMa, please read the user documentation.

Please, use the mima-user Mailing List for questions and comments.

MiMa's Modules

MiMa is split into Several modules:

  • Core: Classes that are used for detection.
  • Core-UI: UI Classes that can be re-used between different detectors.
  • Reporter: Raw reporting classes and the command line interface.
  • Reporter-UI: Swing interface to the reporter.
  • SBT Plugin: The SBT plugin for usage inside SBT builds.

Eclipse

In order to create Eclipse metadata files (i.e., .classpath and .project) we recomend to use sbteclipse.

Setting up sbteclipse is a simple three-steps process:

  • Create a eclipse.sbt file under the project folder and add the sbteclipse plugin. At the time of this writing, my project/eclipse.sbt contains the following:

    addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")

  • Start sbt from command line on the project's root, and execute the following command eclipse (or eclipse with-source=true if you want source attachments correctly set)

  • Once done, import all modules in Eclipse, i.e., just click on File > Import > General > Exisiting Projects Into Workspace, select the MiMa project's root folder, all modules should be correctly loaded.

Build

Using sbt 0.13.0 or newer.

  $ sbt compile

This will recompile all MiMa's modules.

If you'd like to create distributable jar files run:

  $ sbt assembly

This will create reporter/target/mima-reporter-assembly-....jar and reporter-ui/target/mima-reporter-ui-assembly-....jar jar files that can be used to launch the command line and ui version of MiMa.

Launch MiMa Reporter UI

Type the following command to run the MiMa Reporter

$ sbt reporter-ui/run

Launch MiMa Reporter CLI

Type the following command to run the MiMa Reporter command-line

$ sbt reporter/run

MiMa Reporter: Functional Tests

The directory containing the MiMa Reporter module ('reporter') there is a 'functional-tests' folder that contains several functional tests exercising the system. All tests are executed as part of the build, therefore when running

$ sbt test-functional

if one (or more) test fails the build is stop and no jar will not be produced.

To add a new functional test to the suite, create a new folder within 'functional-tests' directory with the following structure:

functional-tests
    |
    | --> <your-new-test-folder> (folder for your new test)
		|
		|-----> problems.txt (the expected list of reported errors - 1 line per error)
		|-----> v1 (folder containing sources @ version 1)
		|-----> v2 (folder containing sources @ version 2)

After doing that, reload if you are in a sbt console session (if that makes nosense to you, it means you are fine and you can run the test as usual).

Tests within the functional-tests folder should always pass.

Note: The problems.txt is the test oracle. Expected errors are declared using the Mima's reporting output (i.e., the output of the tool and the expected errors should match perfectly). Admittedly, this coupling is an issue since the testing framework is highly coupled with the tool output used to report errors to the user. We should improve this and make the two independent. Until then, mind that by changing the output of the tool you will likely have to update some of the test oracles (i.e., problems.txt file).

Releasing

MiMa releases to several different locations:

  1. Maven central (libraries)
  2. Bintray (sbt plugin)
  3. downloads.typesafe.com (bundled CLI + UI artifacts).

To deploy to locations 1 and 2, use the publish task, but make sure your credentials for both Sonatype's OSSRH + Bintray typesafe organization are in order. After deploying, you need to log in to OSSRH and close/release the repository containing library. To release sbt plugin repository use sbtplugin/bintrayRelease task.

To deploy to downloads.typesafe.com, you need to run the s3-upload task, ensuring the appropriate credentials are in place (See sbt-s3 for more info).

MiMa releases should also update the content found on the Typesafe Website.

FAQ

java.lang.OutOfMemoryError - Java heap space: If you are experiencing out of memory exception you may need to increase the VM arguments for the initial heap size and the maximum heap size. The default values are -Xms64m for for the initial heap size and -Xmx256m for the maximum heap size.

Bugs and Feature requests

Use the GitHub project page for filing new tickets. For questions and comments, please use the mima-user Mailing List.

Contributing

If you'd like to contribute to the MiMa project, please sign the contributor's licensing agreement.

License

Copyright 2012 Typesafe, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

migration-manager's People

Contributors

jsuereth avatar dotta avatar havocp avatar retronym avatar gkossakowski avatar darabos avatar huitseeker avatar harrah avatar 2m avatar paulp avatar xuwei-k avatar

Watchers

Konrad `ktoso` Malawski avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.