Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

SPM Prep – Move sources and tests in Sources/ and Tests/ respectively#764

Merged
mokagio merged 18 commits intotrunkfrom
mokagio/sources-and-tests-folders
Mar 26, 2024
Merged

SPM Prep – Move sources and tests in Sources/ and Tests/ respectively#764
mokagio merged 18 commits intotrunkfrom
mokagio/sources-and-tests-folders

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Mar 25, 2024

What it says in the title. This PR only moved files but required a couple of adjustments in the Xcode project :

  • Remove some "Group without folder" which would have made the setup harder to migrate
  • Move the WPKitLogging- files out of the Private folder. The .h in particular is public in the project, but having it in that folder resulted in a validation failure at the CocoaPods level.

Testing Details

See CI.


  • Please check here if your pull request includes additional test coverage. — N.A.
  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary. — N.A.

mokagio added 15 commits March 25, 2024 12:43
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
This is to prepare the move to `Sources/` and `Tests/`. Many of the
groups had only one file in them and there was no correspondence between
them and the source code. By removing them, the job of changing the root
to `Tests/` becomes simpler because we won't have to update references
to "Group without Folder" that could not update automatically.
This is to prepare the move to `Sources/` and `Tests/` in a way that
keeps the existing structure intact, for ease of navigation.
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

mokagio added 2 commits March 25, 2024 13:59
This required fixing the location of the `WPKitLogging*` files, which
were public in the project but for some reason in the `Private/` folder
and therefore considered private by CocoaPods (failing the bulid).
@mokagio mokagio force-pushed the mokagio/sources-and-tests-folders branch 2 times, most recently from b422150 to fce2b0d Compare March 25, 2024 05:16
@mokagio mokagio force-pushed the mokagio/sources-and-tests-folders branch from fce2b0d to 3049fe5 Compare March 25, 2024 08:46
@mokagio mokagio requested a review from crazytonyli March 25, 2024 08:46
PODFILE CHECKSUM: 64af6d71574c7a92d01a9446aa874e066917ebe5

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated it as a preliminary, cover-all-bases, step before looking into a spec validation issue I incurred.

@@ -1298,13 +1298,11 @@
AB49D0B225D1B4D80084905B /* post-likes-failure.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "post-likes-failure.json"; sourceTree = "<group>"; };
ABD95B7E25DD6C4B00735BEE /* CommentServiceRemoteRESTLikesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentServiceRemoteRESTLikesTests.swift; sourceTree = "<group>"; };
ABD95B8425DD6DA200735BEE /* comment-likes-success.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "comment-likes-success.json"; sourceTree = "<group>"; };
B56D96B0202C9B7500485233 /* WordPressUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WordPressUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👀 👀 👀

What was this doing in here? A leftover from a long time ago when WordPressUI was part of the project?

s.source_files = 'WordPressKit/**/*.{h,m,swift}'
s.private_header_files = 'WordPressKit/Private/*.h'
s.header_dir = 'WordPressKit'
s.source_files = 'Sources/**/*.{h,m,swift}'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could have made this Sources/WordPressKit/*.{h,m,swift} but I thought I'd leave it looser for the moment. I'm not sure how/if to sort how subspecs as well as subpackages.

@mokagio mokagio enabled auto-merge March 25, 2024 08:51
@mokagio mokagio merged commit e173408 into trunk Mar 26, 2024
@mokagio mokagio deleted the mokagio/sources-and-tests-folders branch March 26, 2024 02:31
@mokagio mokagio mentioned this pull request Mar 26, 2024
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants