Merged
Conversation
b92a837 to
33a0d2b
Compare
- Rename 'archs' parameter to 'architectures' for better readability - Remove unreachable configuration validation (Zod handles it) - Fix CHANGELOG.md tool name from swift_package_list_processes to swift_package_list - Rename registerListSwiftPackageProcessesTool to registerListSwiftPackageTool for consistency - Extract repeated Zod schemas to common.ts to reduce duplication
There was a problem hiding this comment.
Pull Request Overview
Introduces full Swift Package Manager (SPM) support by defining a new workflow group, registering workflow tools, implementing SPM commands, and providing example projects and documentation updates.
- Defined
SWIFT_PACKAGE_WORKFLOWand registered build/test/run/list/stop/clean tools. - Implemented SPM tool handlers (
swift_package_build,swift_package_test,swift_package_run, etc.). - Updated documentation, examples, and the changelog to reflect SPM support.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/utils/tool-groups.ts | Added SWIFT_PACKAGE_WORKFLOW enum value |
| src/utils/register-tools.ts | Registered all SPM tools in the registry |
| src/tools/common.ts | Added Zod schemas for SPM configuration and architectures |
| src/tools/build-swift-package.ts | Implemented swift_package_build tool handler |
| src/tools/test-swift-package.ts | Implemented swift_package_test tool handler |
| src/tools/run-swift-package.ts | Implemented swift_package_run, swift_package_list, swift_package_stop, and swift_package_clean |
| example_projects/spm/ | Added example Swift package with executables and tests |
| TOOL_OPTIONS.md | Documented environment flags for SPM tools |
| README.md | Added Swift Package Manager section |
| CHANGELOG.md | Added v1.7.0 entry for SPM support |
Comments suppressed due to low confidence (2)
src/utils/register-tools.ts:160
- No tests currently cover the registration of the new Swift package tools. Add unit or integration tests to verify that each tool is registered and discoverable by the server.
{
src/tools/test-swift-package.ts:47
- The
--test-productflag may not be supported byswift test. Verify the correct CLI option (e.g.,--filter) or remove this parameter to avoid unexpected failures.
args.push('--test-product', params.testProduct);
| const args: string[] = ['build', '--package-path', resolvedPath]; | ||
|
|
||
| if (params.configuration && params.configuration.toLowerCase() === 'release') { | ||
| args.push('-c', 'release'); |
There was a problem hiding this comment.
[nitpick] Consider adding an else if branch to explicitly handle invalid configuration values (values other than 'debug' or 'release') and return an error, similar to the test and run tools.
Suggested change
| args.push('-c', 'release'); | |
| args.push('-c', 'release'); | |
| } else if (params.configuration && params.configuration.toLowerCase() !== 'debug') { | |
| return createErrorResponse( | |
| 'Invalid configuration value', | |
| `The configuration '${params.configuration}' is not supported. Valid values are 'debug' or 'release'.`, | |
| 'ValidationError' | |
| ); |
Closed
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.
Summary
build_swift_packagetoolTesting
npm run lintnpm run formatnpm run buildhttps://chatgpt.com/codex/tasks/task_e_683ffa38f338832b9b8e50946308d7b4