Skip to content

Cleanup Workspace Module #2970

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 7 commits into from
Oct 8, 2020
Merged

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Oct 8, 2020

Working on the Swift Package Manager client implementation for package registry support (#2967), it took some time for me to understand the functionality of the Workspace module — inn part, because some APIs are declared in places I didn't expect. For example, files often contain declarations or extensions for unrelated types at the end.

This PR extracts some standalone types into separate files and moves other declarations around to be closer to related APIs.

For additional context, these commits were cherry picked from my local development branch. Rather than risk a monolithic, difficult-to-merge PR at the very end of the process, I'd like to take a more incremental approach and break up changes into manageable pieces.

@neonichu
Copy link
Contributor

neonichu commented Oct 8, 2020

@swift-ci please smoke test

@neonichu
Copy link
Contributor

neonichu commented Oct 8, 2020

/Users/buildnode/jenkins/workspace/swift-package-manager-PR-osx-smoke-test/branch-main/swift/include/swift/Runtime/Concurrent.h:671:9: error: use of undeclared identifier 'swift_runtime_unreachable'; did you mean 'swift_unreachable'?

This doesn't look related, let's re-run.

@neonichu
Copy link
Contributor

neonichu commented Oct 8, 2020

@swift-ci please smoke test

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

Thanks for doing this refactoring. This looks good to me.

@MaxDesiatov
Copy link
Contributor

@swift-ci please smoke test OS X platform

@MaxDesiatov
Copy link
Contributor

@swift-ci please smoke test Linux platform

@neonichu neonichu merged commit 0520891 into swiftlang:main Oct 8, 2020
@mattt mattt deleted the workspace-module-cleanup branch October 9, 2020 11:06
mattt added a commit to mattt/swift-package-manager that referenced this pull request Oct 12, 2020
* Extract ManagedDependency into separate file

* Extract ManagedArtifact into separate file

* Move declaration of Workspace.DependencyManifests

* Move APIs out of misc.swift

Create ResolvedFileWatcher.swift

* Move ManagedArtifacts and ManagedDependencies declarations

* Move declaration of ToolsVersion.zeroedPatch instance method

* Move Workspace.DependencyManifests declaration to TSCUtilities Functions extension
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.

4 participants