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

Tracking Issue for Incr. Comp. Regression Testing #36350

michaelwoerister opened this Issue Sep 8, 2016 · 0 comments


None yet
1 participant

michaelwoerister commented Sep 8, 2016

Incremental compilation needs good regression testing, which can be split into the following components:

  • End-to-end tests for specific common cases, like already present to some extent in test/incremental. These will use the #[rustc_clean]/#[rustc_dirty] and #![rustc_partition_reused] infrastructure.
  • Tests for the Incremental Compilation Hash (ICH) that we compute for input data (i.e. HIR and imported Metadata). I'll open individual issues for each of the below soon.
    • Test ICH for structs (see PR #36370)
    • Test ICH for enums (#36674)
    • Test ICH for traits (#36681)
    • Test ICH for function interfaces (#36812)
    • Test ICH for function bodies
      • Test ICH for unary and binary expressions (#37520)
      • Test ICH for call expression (#37693)
      • Test ICH for let statements (#37654)
      • Test ICH for match expressions (#37654)
      • Test ICH for if expressions (#37694)
      • Test ICH for while loops and loop loops (#37841)
      • Test ICH for for loops (#37841)
      • Test ICH for closure expressions (#38202)
      • Test ICH for struct constructor expressions
      • Test ICH for enum constructor expressions (#38202)
      • Test ICH for slice/indexing expressions (#38202)
      • Test ICH for inline assembly (#38557)
    • Test ICH for extern blocks (#38479)
    • Test ICH for inherent impls/methods (#38502)
    • Test ICH for trait impls/methods (#38849)
    • Test ICH for type definitions (#37799)
    • Test ICH for statics (#37001)
    • Test ICH for constants (#37000)
    • Test ICH for command line arguments
  • Dependency graph oriented tests that make sure that certain edges are present or not present under certain circumstances. These will use the #[rustc_if_this_changed]/#[rustc_then_this_would_need] infrastructure.
  • Git history based tests that will walk the history of some selected crates, building each revision incrementally and from scratch and then comparing the two for equality. These tests will be based on cargo incremental. See #36809 for more information.

In order to make it easy to contribute in this area, we'll also want to

  • Compile links to the appropriate documentation of the test framework and some of the concepts and inner workings of incremental compilation
  • Provide well-documented examples of what test cases in various areas should look like
  • Expand the above list with as concrete as possible descriptions of individual test cases we are interested in, and open individual GH issues for them.

bors added a commit that referenced this issue Oct 2, 2016

Auto merge of #36840 - eulerdisk:incr_test_for_hash_enum, r=michaelwo…

Test Case for Incr. Comp. Hash for enums #36674.

Fixes #36674
Part of #36350

r? @michaelwoerister

bors added a commit that referenced this issue Oct 7, 2016

Auto merge of #36940 - eulerdisk:incr_test_for_hash_trait, r=michaelw…

Test Case for Incr. Comp. Hash for traits #36681.

Fixes #36681
Part of #36350

Currently, the following tests fail:

Unsafe modifier
Extern modifier
Extern c to rust-intrinsic
Trait unsafety
Change type of method parameter (&i32 => &mut i32)
Mode of self parameter

r? @michaelwoerister
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment