Skip to content

Adopt idiomatic SwiftPM Sources/<TargetName>/ layout for core SDK and _AblyPluginSupportPrivate #2229

Description

@maratal

Background

The repo's source directories are inconsistent with SwiftPM conventions:

SwiftPM's convention is Sources/<TargetName>/, which also lets targets drop their explicit path:. #2228 was a deliberately minimal step that only removed the confusing Source/ + Sources/ coexistence; this issue tracks the fuller, idiomatic reorg.

Proposed target layout

Sources/
  Ably/                        # everything currently in Source/
  _AblyPluginSupportPrivate/   # moved back under Sources/

Both targets would then match the Sources/<TargetName>/ convention and could drop their explicit path: in Package.swift.

Note

A naive merge won't work: today's Source/ is a target root (loose .m files at its top), so it can't sit directly inside Sources/ next to another target's root — SwiftPM rejects overlapping/nested source roots. The core files must move into their own Sources/Ably/ subfolder.

Work involved

Unlike the _AblyPluginSupportPrivate move, renaming the core Source/ touches the non-SPM distribution paths:

  • Package.swift — update (or drop) path: for Ably and _AblyPluginSupportPrivate
  • Ably.podspecsource_files, resource_bundles, private_header_files, module_map (Source/**Sources/Ably/**)
  • Scripts/generate-markdown-api-reference.py — the Source/include… references
  • Ably.xcodeproj/project.pbxproj — file/group references (done manually in Xcode); Carthage builds through this
  • Consider the test dirs too (Test/ singular vs LiveObjects/Tests/ plural)
  • Verify: swift build --build-tests, make lint, CocoaPods lint, Carthage build

Timing

Best done once the in-flight LiveObjects integration work has landed, to avoid large rebase conflicts.

Follow-up to #2228.

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions