Draft Proposal (Community Review): Improving SwiftPM Developer Experience & Documentation

Hi everyone :waving_hand:

I’m drafting a Google Summer of Code proposal with Swift focused on improving developer experience (DX) through targeted documentation and discoverability improvements in Swift Package Manager.

Before finalising anything, I’d really value community and maintainer feedback on whether this direction aligns with current needs.

Motivation

From community discussions, issue threads, and my own experience, it seems that many SwiftPM pain points are not caused by missing functionality, but by implicit or undocumented behaviour that makes troubleshooting difficult.

This often shows up as:

  • users being unsure whether a failure is due to misuse, misunderstanding, or an actual bug

  • contributors not knowing where in SwiftPM to look when something breaks

  • advanced features working correctly, but feeling opaque or unpredictable

The goal of this project is to reduce that ambiguity, not by changing behaviour, but by making existing behaviour more discoverable and explainable.

Problem Areas (tentative & feedback-driven)

Based on initial exploration, the following areas seem especially impactful:

  • Target & product types in package manifests
    Particularly where current documentation assumes prior ecosystem or historical knowledge.

  • Binary targets & artifact bundles
    Where usage patterns, guarantees, and tradeoffs are not clearly explained in SwiftPM-specific terms.

  • Operational behavior
    Such as dependency resolution, caching, and build phases, which affect troubleshooting but are rarely documented as systems.

  • Plugin & code generation workflows
    Where behavior can be unintuitive or silent, making it hard to diagnose issues.

These areas are not fixed scope — I’d prefer to refine priorities based on maintainer guidance.

Non-Goals

To be explicit, this project is not intended to:

  • redesign SwiftPM features or APIs

  • change compiler or toolchain behaviour

  • replace existing API reference documentation

The focus is on conceptual clarity, guidance, and discoverability, complementing existing references.

Expected Outcomes (high-level)

If successful, this project would aim to:

  • make advanced SwiftPM features easier to reason about

  • reduce “trial-and-error” troubleshooting

  • lower the barrier for new contributors to understand SwiftPM internals at a conceptual level

  • reduce recurring documentation-related questions in forums and issues

Feedback I’m Looking For

I’d especially appreciate input on:

  • whether these problem areas resonate with current maintainer pain points

  • which areas would be most valuable to prioritise in a GSoC-sized project

  • any past efforts or discussions I should align with or avoid duplicating

If this direction seems useful, I’m happy to follow up with a more concrete breakdown privately or in smaller scope.

Thanks for taking the time — and thanks to everyone maintaining SwiftPM :folded_hands:
— Vidit

Organizational request: Please tag gsoc posts with gsoc-2026 tag :slight_smile:

2 Likes

Thanks for the heads up — added the gsoc tag :+1:

1 Like

Thank you!

Sorry I should have immediately also provided some feedback in my first reply.

I’m representing the general Swift organization in participating in GSoC, not as much the SwiftPM specific aspect of your idea: Generally documentation focused projects like this are not great project candidates because they are hard to measure as a success or not, and we’ve historically tended to prefer coding tasks. As it serves as a great way to teach contributors about Swift and have a “measurable” deliverable. So from that angle, I’m a bit worried about this project’s success criteria, if a mentor would be found to run it.

I’ll let the SwiftPM folks chime in though if there’s anyone who’d be interested in mentoring or changing the project into something slightly different.

Thank you for the thoughtful clarification — that concern makes a lot of sense, and I appreciate you calling it out explicitly.

I completely agree that a purely documentation-focused project would be difficult to evaluate and risky from a GSoC perspective. My intention with this draft was less about “writing docs” in isolation, and more about addressing developer experience gaps where documentation is one visible outcome, but not the only deliverable.

I’m very open to reshaping this into something more measurable and coding-backed, for example:

  • producing concrete, reviewable artifacts (docc catalogs, structured conceptual guides, or tooling changes that improve discoverability),

  • grounding the work in specific SwiftPM subsystems so progress can be evaluated incrementally,

  • and, where appropriate, pairing documentation with small but targeted code or tooling improvements that make existing behavior more explicit.

If the SwiftPM maintainers feel there’s a way to frame this as a DX-oriented project with clearer technical deliverables and success criteria, I’d be very interested in adapting the proposal in that direction.

Thanks again for the guidance — I’ll wait for SwiftPM folks to chime in and adjust based on their feedback.