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

publish-lockfile: Various updates #6840

Merged
merged 12 commits into from
Apr 18, 2019
Merged

Commits on Apr 16, 2019

  1. Configuration menu
    Copy the full SHA
    ebb5764 View commit details
    Browse the repository at this point in the history
  2. publish-lockfile: Always check Cargo.lock is up-to-date.

    This changes it so that `cargo package` will make sure the Cargo.lock file is
    in sync with the Cargo.toml that is generated during packaging. This has several
    points:
    
    - This makes the Cargo.lock more accurately reflect what would be locked
      if a user runs `cargo install` on the resulting package.
    - In a workspace, this removes irrelevant packages from the lock file.
    - This handles `[patch]` dependencies and dual-source dependencies (like
      path/version).
    - Warnings are generated for any differences in the lock file compared to the
      original.
    
    This has a significant change in how `cargo package` works. It now
    unconditionally copies the package to `target/package`. Previously this was only
    done during the verification step. This is necessary to run the resolver against
    the new `Cargo.toml` that gets generated.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    27932ea View commit details
    Browse the repository at this point in the history
  3. cargo install: Ignore Cargo.lock for non --path installs.

    Requires `--locked` to use Cargo.lock for registry and git installs.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    3d89379 View commit details
    Browse the repository at this point in the history
  4. Add warnings for yanked dependencies.

    This only applies for `cargo package/publish` with the publish-lockfile feature,
    or `cargo install --locked`.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    5f616eb View commit details
    Browse the repository at this point in the history
  5. publish-lockfile: Change default to true.

    The feature still needs to be enabled.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    c03c85a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eae8900 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6eb55ab View commit details
    Browse the repository at this point in the history
  8. cargo publish: Revert back to extracting tar file.

    This constructs the new Cargo.lock in memory instead of writing it directly
    to disk. The in-memory copy is added to the tar file directly.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    9328b12 View commit details
    Browse the repository at this point in the history
  9. Alter cargo package Cargo.lock modification note.

    Try to make it clearer that it is not modifying the actual Cargo.lock file, but
    the one that is being stored in the .crate file.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    753b03f View commit details
    Browse the repository at this point in the history
  10. Avoid multiple index updates.

    This also restores the Cargo.lock update during packaging.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    5553284 View commit details
    Browse the repository at this point in the history
  11. Remove source from compile_ws.

    This was added for `cargo install` to avoid updating the source multiple times.
    Now that multiple updates are guarded via `Config::updated_sources`, it is
    no longer necessary.
    ehuss committed Apr 16, 2019
    Configuration menu
    Copy the full SHA
    8a30158 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2019

  1. Include Cargo.lock in package checks.

    This includes `Cargo.lock` in the git dirty check. It explicitly excludes
    `Cargo.lock` as an untracked file, since it is not relevant for the dirty check;
    it is only checked if it is committed to git.
    
    This also adds `Cargo.lock` to the "did anything modify this" check during
    verification. I don't see a reason to exclude it (particularly since ephemeral
    workspaces do not save the lock file).
    
    Also add "Archiving: Cargo.lock" to the verbose output.
    ehuss committed Apr 17, 2019
    Configuration menu
    Copy the full SHA
    7d20230 View commit details
    Browse the repository at this point in the history