Code Monkey home page Code Monkey logo

mini-crater's Introduction

mini-crater

This tool finds the crates that rely on a target crate and builds them locally with an updated version of the target crate. This can be used to evaluate the scope of a breaking change before it is released.

Usage

  1. Install the tool

    cargo install --git https://github.com/shepmaster/mini-crater
    
  2. Run the tool. Provide the crate name, the version to upgrade from, and one or more patch lines to substitute in. You can set the environment variable RUST_LOG=trace to have more detail about the process.

Examples

Normal upgrade

This evaluates crates that use SNAFU 0.6 to see if they will all build with a locally-modified version of snafu and snafu-derive.

mini-crater snafu \
--version 0.6 \
--patch snafu=/Users/shep/Projects/snafu \
--patch snafu-derive=/Users/shep/Projects/snafu/snafu-derive

Applying changes along with the upgrade

This runs a user-specified script called adjust-code.sh as the second build step:

mini-crater snafu \
  --version 0.6 \
  --patch snafu=/Users/shep/Projects/snafu \
  --patch snafu-derive=/Users/shep/Projects/snafu/snafu-derive \
  --use-git \
  --post-command /tmp/adjust-code.sh

User-specified scripts have the following environment variables available:

  • MINI_CRATER_WORKING_DIR - The root working directory.
  • MINI_CRATER_EXPERIMENT_NAME - The name of the current crate being experimented on.
  • MINI_CRATER_EXPERIMENT_CHECKOUT_DIR - When a git checkout has been performed, this points to the top of the checkout.

mini-crater's People

Contributors

shepmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

icodein

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.