Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Support for rust #7260

Closed
wants to merge 38 commits into from
Closed

[WIP] Support for rust #7260

wants to merge 38 commits into from

Commits on Feb 19, 2019

  1. add rust plugin

    Robert Steiner committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    bbd7b53 View commit details
    Browse the repository at this point in the history
  2. add rust plugin in pants.ini

    Robert Steiner committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    43d243d View commit details
    Browse the repository at this point in the history
  3. remove toolchain in pants.ini

    Robert Steiner committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    696ff04 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2019

  1. add hashlib Python 3 compatibility

    Robert Steiner committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    d8a95b6 View commit details
    Browse the repository at this point in the history
  2. replace the call dict() with the dict literal

    Robert Steiner committed Feb 20, 2019
    Configuration menu
    Copy the full SHA
    4e90acf View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2019

  1. add workspace class

    - moved workspace methods to the workspace class
    Robert Steiner committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    b2abae5 View commit details
    Browse the repository at this point in the history
  2. add util tests

    Robert Steiner committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    c5334f3 View commit details
    Browse the repository at this point in the history
  3. replace concatenating strings with format

    Robert Steiner committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    8d8fd5c View commit details
    Browse the repository at this point in the history
  4. change type of make_dirs and make_sym_links

    - replaced dict with array
    Robert Steiner committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    7ca6598 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2019

  1. add support for rustc-env

    - added tests for build output parsing functions
    - fixed year in headers
    - fixed parsing of `rustc-flags` ([can be a set of flags](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script))
    Robert Steiner committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    04270c8 View commit details
    Browse the repository at this point in the history
  2. replace izip with zip

    Robert Steiner committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    80f67f7 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2019

  1. get member names and paths from manifest

    - member names and paths are automatically resolved by interpreting the workspace manifest
    - the list of member names in the BUILD file is no longer necessary
    Robert Steiner committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    63ddb59 View commit details
    Browse the repository at this point in the history
  2. remove supports_passthru_args

    Robert Steiner committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    8897639 View commit details
    Browse the repository at this point in the history
  3. fix bug in member paths

    Robert Steiner committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    7360625 View commit details
    Browse the repository at this point in the history
  4. set messages to debug level

    Robert Steiner committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    5d4a565 View commit details
    Browse the repository at this point in the history
  5. replace requested_goals with is_required_data

    Robert Steiner committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    9a76500 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2019

  1. add classes for binary and library targets

    - binary and library targets aren’t enabled yet
    - refactored target class hierarchy
    Robert Steiner committed Feb 26, 2019
    Configuration menu
    Copy the full SHA
    1fe4c0a View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2019

  1. change the way the toolchain is defined

    - the toolchain can be defined in `pants.ini`
    
    Example
    
    ```
    [bootstrap.cargo]
    toolchain: nightly-2018-12-31
    ```
    
    - the value can be a name or a path to a rust-toolchain file
    - the default value is `nightly-2018-12-31`
    - removed the toolchain path in the cargo_workspace target
    Robert Steiner committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    0324050 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. code clean up

    Robert Steiner committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    8435281 View commit details
    Browse the repository at this point in the history
  2. enable cargo binary and library targets

    - added examples for binary, library and workspace targets
    Robert Steiner committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    0bf7db2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    88aa474 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2019

  1. Fix Python 3 compatibility

    - removed duplicate log message
    Robert Steiner committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    cd02886 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2019

  1. set toolchain explicit

    - switched default toolchain to explicit toolchain to have the highest precedence
    - CI tests failed because the `rust-toolchain` file overwrote the default toolchain
    - [More information about the toolchain override precedence](https://github.com/rust-lang/rustup.rs#override-precedence)
    Robert Steiner committed Mar 2, 2019
    Configuration menu
    Copy the full SHA
    df17c8d View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2019

  1. set toolchain for rustc

    Robert Steiner committed Mar 5, 2019
    Configuration menu
    Copy the full SHA
    4455022 View commit details
    Browse the repository at this point in the history
  2. improve the installation of the rust toolchain

    - made the fingerprint of the rustup install script configurable via  the option `--script_fingerprint`
    - the rustup install script is only downloaded once and stored in `<versioned_workdir>/rustup_install_script/rustup.sh`
    - the task tries to find the executable of rustup in the default location `~/.cargo/bin` if the task can’t find the executable via the `PATH` variable
    Robert Steiner committed Mar 5, 2019
    Configuration menu
    Copy the full SHA
    9742f84 View commit details
    Browse the repository at this point in the history
  3. add support for cargo:warning

    Robert Steiner committed Mar 5, 2019
    Configuration menu
    Copy the full SHA
    bd3f95c View commit details
    Browse the repository at this point in the history
  4. fix parsing tests

    Robert Steiner committed Mar 5, 2019
    Configuration menu
    Copy the full SHA
    987f5fb View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2019

  1. update rustup fingerprint

    - fixed AttributeError for self.LAST_KNOWN_FINGERPRINT
    Robert Steiner committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    3edea2e View commit details
    Browse the repository at this point in the history
  2. add simple support for rerun-if-(env-)changed

    To build always valid binaries, the compile task implements a simple solution to support `cargo:rerun-if-env-changed` and `cargo:rerun-if-changed` statements.
    If a build script target contains a `cargo:rerun-if-env-changed` or `cargo:rerun-if-changed` statement, the compile task marks that target and its dependent targets as invalid. The task itself doesn’t actually check if an environment variable or a file has changed.
    Robert Steiner committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    ebf3ce1 View commit details
    Browse the repository at this point in the history
  3. replace array with set

    - to have no duplicate paths in make_dirs and make_sym_links
    Robert Steiner committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    da3e78f View commit details
    Browse the repository at this point in the history
  4. fix value of read_file parameter

    Robert Steiner committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    e7b5e37 View commit details
    Browse the repository at this point in the history
  5. write std_err of a build script into a file

    Robert Steiner committed Mar 7, 2019
    Configuration menu
    Copy the full SHA
    70fac18 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2019

  1. refactor cargo_task

    - Cancel the execution of pants if the execution of a subprocess call in the tasks `fetch`, `build` or `bootstrap` fails.
    - Show `std_out` and `std_err` if the execution of a build script fails.
    
    - fixed a bug in program_rule (multiple targets may depend on a build script)
    Robert Steiner committed Mar 11, 2019
    Configuration menu
    Copy the full SHA
    4a43cec View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2019

  1. add support for the remaining cargo lib kinds

    - libraries of the kind `rlib`, `dylib`, and `staticlib` are now supported
    - removed the `CargoSyntheticProcMacro` target
    - cargo libraries of the kind `proc-marco` are now treated as `CargoSyntheticLibrary`
    - replaced the workunit outcome with the return code
    - removed the logging of the workunit outcome
    - added the env variables of a test invocation to the `rust_test` product (if the `DYLD_LIBRARY_PATH` is missing, the proc-macro test will fail)
    Robert Steiner committed Mar 13, 2019
    Configuration menu
    Copy the full SHA
    8b3ab28 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2019

  1. add tests

    Robert Steiner committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    d65c523 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2019

  1. add fingerprint strategy and tests

    - added build, fetch integration tests
    - added build, workspace tests
    - refactored basic, custom build rules to reduce code duplications
    - added build_flags fingerprint strategy (additional cargo options such as `release` or `test` are now taken into account in the fingerprint)
    - added additional examples
    - removed cargo lock files in rust examples
    - changed dist path of libraries and binaries from `dist/lib`, `dist/bin` to `dist/rust/lib`, `dist/rust/bin`
    - the way in which the fingerprint of a crate is calculated has been changed to prevent crates from being compiled multiple times
    Robert Steiner committed Apr 1, 2019
    Configuration menu
    Copy the full SHA
    d63d329 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2019

  1. add ignore-rerun option and code cleanup

    Robert Steiner committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    64c7deb View commit details
    Browse the repository at this point in the history
  2. format code

    Robert Steiner committed Apr 4, 2019
    Configuration menu
    Copy the full SHA
    ac17c0d View commit details
    Browse the repository at this point in the history