Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

Cli ergonomics #9

Closed
wants to merge 10 commits into from
Closed

Cli ergonomics #9

wants to merge 10 commits into from

Commits on Jun 6, 2018

  1. Travis updates

    - add cargo cache to travis
    - fix travis badge into cargo.toml
    - 1.17.0 build can fail
    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    64c1bc8 View commit details
    Browse the repository at this point in the history
  2. update copyright

    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    2ec7760 View commit details
    Browse the repository at this point in the history
  3. Small code shake-up

    Use rust modules to reflect the following code design:
    - src/main.rs	cli, setup, logs, IO
    - src/lib.rs	core logic (can be re-exported)
    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    fac490a View commit details
    Browse the repository at this point in the history
  4. Bump cargo version to 1.27

    The api breaks in different point, particularly there is no more a
    `call_main_without_stdin` function.  Because of that the cli arguments
    are temporarily dropped.
    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    e7a61f8 View commit details
    Browse the repository at this point in the history
  5. Use structopt for argument parsing

    Structopt is the ergonomic argument-as-structures in rust. The arguments
    are organized in commands and subcommands:
    
    - src/main.rs	non-cargo configuration and cli parsing (-v, -q)
    - src/lib.rs	real cli parsing and defaults (build [args], etc)
    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    d94ab48 View commit details
    Browse the repository at this point in the history
  6. Better error handling with failure::Error

    The main returns a Result<(), failure::Error> that wraps all the
    possible errors from libraries.
    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    58c7335 View commit details
    Browse the repository at this point in the history
  7. Handle --ebuild-path flag

    gibix committed Jun 6, 2018
    Configuration menu
    Copy the full SHA
    3596224 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    eb25067 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2018

  1. Drop cargo for cargo_metadata

    Cargo_metadata is a crate the expose the cargo-metadata subcommand. Rely
    on metadata and not on cargo directly reduces considerably both the
    runtime and compile-time costs.  The downside is that cargo_metadata
    doesn't expose cargo's internal types and metadata. By now is not a
    blocking issue because the missing informations can be extracted
    directly from the manifest file.  Has been added also another argument
    to the `build` to specify a manifest path, because of that now
    cargo-ebuild doesn't rely anymore on a cargo project but only on the
    manifest.  This change removes also some boilerplate code like resolve,
    workspace, etc.
    
    In future work should ported the [package.metadata] field of the
    `Cargo.toml` to handle cargo-ebuild specific configurations (es
    KEYWORDS).
    
    In future new version of the cargo-metadata format and cargo features
    should be mapped into cargo_metadata in order to be used.
    gibix committed Jun 13, 2018
    Configuration menu
    Copy the full SHA
    0ef37ce View commit details
    Browse the repository at this point in the history
  2. Add first integration test

    The simple test solution is on the ebuild generated for cargo-ebuild
    itself. After editing cargo.toml or `cargo update` is necessary to
    upadate the test in `test/integration.rs`.
    gibix committed Jun 13, 2018
    Configuration menu
    Copy the full SHA
    96d7e97 View commit details
    Browse the repository at this point in the history