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

Updates to edition handling. #9184

Merged
merged 11 commits into from
Feb 23, 2021
Merged

Updates to edition handling. #9184

merged 11 commits into from
Feb 23, 2021

Commits on Feb 18, 2021

  1. Some minor refactoring of fix code.

    There shouldn't be any functional changes here.
    
    * Some doc comments.
    * Construct `FixArgs` at once so it doesn't need to bother with unnecessary Options.
    * Remove IdiomEditionMismatch, it is not used.
    * Use a general deduping mechanism for fix messages.
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    b3d865e View commit details
    Browse the repository at this point in the history
  2. Change Fixing to Fixed, and add a verbose "Fixing".

    What was previously "Fixing" was a message for after the fixes had
    been applied. I think it would be clearer if it said "Fixed",
    to indicate that the fixes had actually finished.
    
    The new "Fixing" is posted just before it starts. This is verbose-only
    since it is a little noisy.
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    820537c View commit details
    Browse the repository at this point in the history
  3. Add a migrating message for cargo fix --edition.

    This helps indicate which edition you are moving from and to.
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    3f2f7e3 View commit details
    Browse the repository at this point in the history
  4. Add edition2021 cargo feature.

    This is intended to help make it easier to test the 2021 edition.
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    2ae72ff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    37f4ff9 View commit details
    Browse the repository at this point in the history
  6. Updates to cargo fix --edition.

    * `--edition` always means "next" edition.
    * `--edition` when on the most recent edition is not an error, just a warning.
    * Support fix to 2021 edition.
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    2885022 View commit details
    Browse the repository at this point in the history
  7. Update cargo fix --edition docs.

    # Conflicts:
    #	src/cargo/ops/fix.rs
    #	src/doc/src/reference/unstable.md
    ehuss committed Feb 18, 2021
    Configuration menu
    Copy the full SHA
    21cfac6 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2021

  1. Make edition transitions easier.

    This attempts to centralize all the edition stuff in one place (the
    `Edition` enum) so that adding a new edition or stabilizing one should
    be relatively little work (and more importantly, we don't miss things).
    
    Importantly, this changes `cargo new` to default to the latest stable.
    It also changes the `cargo fix --edition-idiom` behavior to only apply
    idioms for the *current* edition.
    ehuss committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    aa61976 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15513ce View commit details
    Browse the repository at this point in the history
  3. cargo fix: Remove --prepare-for option.

    This was deprecated, never officially part of the stable release.
    ehuss committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    c303213 View commit details
    Browse the repository at this point in the history
  4. Change how workspace resolve behavior is calculated.

    This fixes an issue where warnings would be printed for packages
    migrating to 2021 in a workspace (that the "resolver" field is ignored,
    which is wrong).
    
    This also places the default resolver logic in one place, and should
    make it easier to update later.
    ehuss committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    a82a23c View commit details
    Browse the repository at this point in the history