Add Package.swift support for tuist edit - #5751
Merged
Merged
Conversation
pepicrft
reviewed
Jan 2, 2024
| /// - printOutput: When true it prints the Swift Package Manager's output. | ||
| func update(at path: AbsolutePath, printOutput: Bool) throws | ||
|
|
||
| /// Sets tools version of package to the given value. |
Contributor
There was a problem hiding this comment.
Gets the tools version of the package at the given path
pepicrft
reviewed
Jan 2, 2024
| try System.shared.run(command) | ||
| } | ||
|
|
||
| public func getToolsVersion(at path: AbsolutePath) throws -> Version { |
Contributor
There was a problem hiding this comment.
I'd add an integration test to this one.
pepicrft
reviewed
Jan 2, 2024
pepicrft
approved these changes
Jan 2, 2024
danieleformichelli
approved these changes
Jan 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5537
Short description 📝
Add Package.swift support for tuist edit.
The implementation more-or-less copies the business logic for
Dependencies.swift. But apart from having a new schemePackagesthat includes the filePackage.swift, we also needed to ensure we include thePackageDescriptionframework and we build it with the correct version defined byswift-tools-versioncomment.That's achieved by:
-package-description-version x.y.zforOTHER_SWIFT_FLAGSwhere.x.y.zcan be extracted fromswift package tools-versioncommand/Applications/Xcode-x.y.z.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPISWIFT_INCLUDE_PATHSHow to test the changes locally 🧐
Run
tuist editforfixtures/app_with_spm_dependenciesContributor checklist ✅
make workspace/lint-fixReviewer checklist ✅
changelog:added,changelog:fixed, orchangelog:changed, and the title is usable as a changelog entry