Skip to content

Make ignore-lock a flag #7384

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

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Make ignore-lock a flag #7384

merged 2 commits into from
Feb 29, 2024

Conversation

rauhul
Copy link
Member

@rauhul rauhul commented Feb 29, 2024

This allows users to ignore package locking via --ignore-lock instead of --ignore-lock true.

This allows users to ignore package locking via `--ignore-lock` instead
of `--ignore-lock true`.
@rauhul
Copy link
Member Author

rauhul commented Feb 29, 2024

@swift-ci test

Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is --ignore-lock true still allowed? If not, I wonder how many workflows we would break or if there's any way to retain compatibility?

@rauhul
Copy link
Member Author

rauhul commented Feb 29, 2024

With this change the old form is not allowed. I'm happy to also not make this change actually given that use of the option is highly limited

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--ignore-lock is brand new, I wouldn't worry about breaking existing workflows (#7338). Thanks for noticing @rauhul (as an aside, did you need this?)!

@rauhul
Copy link
Member Author

rauhul commented Feb 29, 2024

--ignore-lock is brand new, I wouldn't worry about breaking existing workflows (#7338). Thanks for noticing @rauhul (as an aside, did you need this?)!

Sadly yes/no;

  • I have a test MMIOFileCheckTests in swift-mmio that must only be run against the MMIO library built in release.
  • My test calls into swift build -c release to ensure the proper dependency is available at test-run-time because I can't express this in Package.swift.
  • I re-use the same scratch build area because the swift-syntax rebuild time is too painful to do a full separate build.

@rauhul rauhul enabled auto-merge (squash) February 29, 2024 17:20
@rauhul
Copy link
Member Author

rauhul commented Feb 29, 2024

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

rauhul added a commit to apple/swift-mmio that referenced this pull request Feb 29, 2024
SwiftPM 6 introduces a lock in the package build directory to avoid
concurrent builds/tests. Unfortuntely this behavior is needed by the
MMIOFileCheckTests currently. This commit adds a flag to avoid locking
the package build directory when building with SwiftPM 6.

Additionally, I have an inflight PR to change `--ignore-lock true` to
`--ignore-lock` so this commit will require a follow-up fix, after that
change in SwiftPM is merged (swiftlang/swift-package-manager#7384).
@rauhul rauhul merged commit 68b6236 into main Feb 29, 2024
@rauhul rauhul deleted the rauhul/improve-lock-arg branch February 29, 2024 22:57
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
This allows users to ignore package locking via `--ignore-lock` instead
of `--ignore-lock true`.
furby-tm pushed a commit to wabiverse/swift-package-manager that referenced this pull request May 15, 2024
This allows users to ignore package locking via `--ignore-lock` instead
of `--ignore-lock true`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants