Giter VIP home page Giter VIP logo

workspace-gen's Introduction

workspace-gen

Given several subdirectories containing cargo projects, creates a parent workspace manifest file.

Find it on crates.io.

Usage

git clone x                   # clone a project into a subfolder
git clone y                   # clone a 2nd project 
cargo install workspace-gen   # add this executable to the path
workspace-gen local-path      # switch paths to local for hacking
cargo build                   # A Cargo.toml now exists, and should wrap both subprojects in a workspace!
workspace-gen git-ref         # switch paths to git refs to share work with others
workspace-gen --help          # display message below
workspace-gen 0.3.0
Given several subdirectories containing cargo projects, creates a parent workspace manifest file

USAGE:
    workspace-gen <MODE>

ARGS:
    <MODE>    What mode to run the program in [possible values: local-path, git-ref, version]

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

Convention over configuration

Tips:

  • To use git-ref mode, name the upstream remote upstream
  • Use an HTTP URL for fetching by setting two separate URLS

Example Output

diff

[workspace]
members = [
    "arrow-datafusion/datafusion-examples",
    "arrow-datafusion/benchmarks",
    "arrow-datafusion/datafusion/physical-expr",
    "arrow-datafusion/datafusion/jit",
    "arrow-datafusion/datafusion/proto",
    "arrow-datafusion/datafusion/row",
    "arrow-datafusion/datafusion/core/fuzz-utils",
    "arrow-datafusion/datafusion/core",
    "arrow-datafusion/datafusion/sql",
    "arrow-datafusion/datafusion/expr",
    "arrow-datafusion/datafusion/optimizer",
    "arrow-datafusion/datafusion/common",
    "arrow-datafusion/datafusion-cli",
    "arrow-ballista/benchmarks",
    "arrow-ballista/ballista/rust/client",
    "arrow-ballista/ballista/rust/core",
    "arrow-ballista/ballista/rust/executor",
    "arrow-ballista/ballista/rust/scheduler",
    "arrow-ballista/ballista-cli",
    "arrow-ballista/python",
    "arrow-ballista/examples",
    "arrow-rs/integration-testing",
    "arrow-rs/parquet",
    "arrow-rs/arrow",
    "arrow-rs/object_store",
    "arrow-rs/arrow-flight",
    "arrow-rs/parquet_derive_test",
    "arrow-rs/parquet_derive",
    "arrow-rs/arrow-pyarrow-integration-testing"
]
exclude = [
    "arrow-datafusion",
    "arrow-ballista",
    "arrow-rs"
]

workspace-gen's People

Stargazers

Michael Angerman avatar Tim Van Wassenhove avatar zbv avatar Andy Grove avatar

Watchers

Brent Gardner avatar

Forkers

isgasho stormrust

workspace-gen's Issues

Copy exclusions from child project tomls

Some times subprojects will not compile, work, etc. In these cases they may have already been excluded from their parent workspaces, and we should copy that exclusion list to the grandparent.

Delete child workspace tomls

I observed issues with CLion building child projects in the wrong location, resulting in multiple target/ directories and errors about importing multiple versions of a dependency. Until JetBrains gets it's bugs fixed, we should just delete the child workspace tomls (they can always be restored from git).

Auto-upgrade versions

Problems have been observed if the child projects (which were previously unaware of each other) are using different versions of arbitrary 3rd party dependencies.

It would be a nice improvement to this tool to find differing versions of the same package and update them to the max found.

Create custom serializer for dependencies

Presently the features and optional fields are always written to generated cargo.toml files and this is likely to turn people off from using the tool, as it smells like generated code. Prevent this by not serializing those fields when they are the defaults.

Add git ref support

It's great to be able to go from the checked-in version of projects to local in order to hack.

However, after hacking is complete, each repo will need to get committed and pushed.

It would be great to have a command line option to switch back and forth from:

  1. { path = "../x/y/x" }
  2. { git = "http://some/repo", ref = "abc123" }

Release command

Presently, to push git-refs, one has to:

  1. run workspace-gem git-ref
  2. go to the parent project (i.e. arrow-rs) commit & push
  3. the commit created a new ref, so re-run workspace-gen git-ref from the root
  4. go up to the next project (i.e. arrow-datafusion), commit & push
  5. ... and so on

Let's automate this process with a release command that just does it.

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.