Skip to content

[Commands] Don't blow away modified Packages. #373

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

Conversation

ddunbar
Copy link
Contributor

@ddunbar ddunbar commented May 27, 2016

  • This adds a limited safety check that we don't let the current update
    workflow remove any modified repositories under Packages. It doesn't detect
    modifications to untracked files, but it should catch most cases.
  • Will add test coverage for this in the swift-integration-tests repo.

(cherry picked from commit 48101cb)


Explanation: Our current implementation of swift package update works by simply removing the Packages subdirectory containing the dependencies, and recloning. However, this is problematic if a user has modified some of the sources there. This change prevents us from doing the removal if we detect modified files.

Scope: Minimal, the change adds safety checks we run before performing the removal of Packages which is done as part of package updating.

Risk: Low, it increases our safety and is covered by automated tests in the swift-integration-tests repository.

Testing: Automated test here: swiftlang/swift-integration-tests@810defb

 - This adds a limited safety check that we don't let the current update
   workflow remove any modified repositories under `Packages`. It doesn't detect
   modifications to untracked files, but it should catch most cases.

 - Will add test coverage for this in the swift-integration-tests repo.

(cherry picked from commit 48101cb)
@tkremenek tkremenek merged commit 82b3fb0 into swiftlang:swift-3.0-preview-1-branch May 27, 2016
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
[BuildSystem] Allow processes to release lanes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants