Rename SwiftGitX enum to SwiftGitXRuntime - #6
Merged
Conversation
…sts to reflect the change.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR resolves a naming conflict between the SwiftGitX enum and the SwiftGitX module by renaming the enum to SwiftGitXRuntime. This prevents ambiguity when trying to reference module-level types, particularly in Swift Testing contexts where Testing.Tag and SwiftGitX.Tag would collide.
Key changes:
- Renamed the
SwiftGitXenum toSwiftGitXRuntimein the main source file - Updated all test references to use the new
SwiftGitXRuntimename - Maintained backward-compatible documentation comments that refer to "the SwiftGitX library" (the module)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Sources/SwiftGitX/SwiftGitX.swift | Renamed the public enum from SwiftGitX to SwiftGitXRuntime to eliminate naming conflict with the module |
| Tests/SwiftGitXTests/SwiftGitXTests.swift | Updated all test code to use SwiftGitXRuntime for initialization, shutdown, and version access across XCTest and Swift Testing frameworks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
The
SwiftGitXenum name conflicts with the module name, making it impossible to reference module-level types when the enum is in scope. This particularly affects tests using Swift Testing whereTesting.TagandSwiftGitX.Tagcreate ambiguity.Before - Ambiguous, doesn't work
Solution
Rename the enum to
SwiftGitXRuntimeto eliminate the naming conflict.After - Clear and unambiguous
Breaking Changes
Simply rename SwiftGitX to SwiftGitXRuntime.