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

rustbuild: Rewrite user-facing interface #37521

Merged
merged 1 commit into from
Nov 6, 2016

Commits on Nov 3, 2016

  1. rustbuild: Rewrite user-facing interface

    This commit is a rewrite of the user-facing interface to the rustbuild build
    system. The intention here is to make it much easier to compile/test the project
    without having to remember weird rule names and such. An overall view of the new
    interface is:
    
        # build everything
        ./x.py build
    
        # document everyting
        ./x.py doc
    
        # test everything
        ./x.py test
    
        # test libstd
        ./x.py test src/libstd
    
        # build libcore stage0
        ./x.py build src/libcore --stage 0
    
        # run stage1 run-pass tests
        ./x.py test src/test/run-pass --stage 1
    
    The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py`
    script. This `x` was chosen to be both short and easily tab-completable (no
    collisions in that namespace!). The build system now accepts a "subcommand" of
    what to do next, the main ones being build/doc/test.
    
    Each subcommand then receives an optional list of arguments. These arguments are
    paths in the source repo of what to work with. That is, if you want to test a
    directory, you just pass that directory as an argument.
    
    The purpose of this rewrite is to do away with all of the arcane renames like
    "rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By
    simply working with directories and files it's much more intuitive of how to run
    a test (just pass it as an argument).
    
    The rustbuild step/dependency management was also rewritten along the way to
    make this easy to work with and define, but that's largely just a refactoring of
    what was there before.
    
    The *intention* is that this support is extended for arbitrary files (e.g.
    `src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet.
    Instead directories work for now but we can follow up with stricter path
    filtering logic to plumb through all the arguments.
    alexcrichton committed Nov 3, 2016
    Configuration menu
    Copy the full SHA
    a270b80 View commit details
    Browse the repository at this point in the history