Skip to content

Instantly share code, notes, and snippets.

@Sberm
Created June 10, 2023 05:42
Show Gist options
  • Save Sberm/8e2a61ce4ce9f5f848a3ae141297dfc2 to your computer and use it in GitHub Desktop.
Save Sberm/8e2a61ce4ce9f5f848a3ae141297dfc2 to your computer and use it in GitHub Desktop.

Hi Ashley,

I tried to reach out to you through your email(acgarland@apple.com) couple weeks ago, but you might not have seen my email. I can't send private message to you on the forum, I can't post directly to you and I couldn't find you on slack either, sorry to contact you in this way.

I’m Howard Chu, the guy who tried to propose for Customizable Package Template project. I’m sorry to tell you that my GSoC proposal got rejected.

However, I still want to contribute to Swift’s codebase and improve the UX of command line tools.

There are two alternatives:

  1. Contribute directly to SwiftPM and customize an interaction CLI specifically for SwiftPM.
  2. Contribute to Swift Argument Parser library and create interactive APIs there. Since SwiftPM uses Swift Argument Parser library too, we can then use these APIs to build SwiftPM’s interactive CLI.

The former solution is the quickest and most straightforward, but it might be a pain to do CI/CD. The latter solution seems to be the best but it may take way longer to be integrated into SwiftPM because it changes both Swift Argument Parser’s and SwiftPM’s code. But then everyone else could use these APIs to build their own interactive CLI.

I lean a little more toward the second solution, what do you think? As I mentioned before, I would love to work with you and help you make the command line UX in your mind. So please give me your thoughts and feedback, that will mean a lot.

I also noticed that in 2022, there were two separate GSoC project ideas(https://www.swift.org/gsoc2022/), there was “Improve CLI User Experience” which was under the topic of Swift Package Manager, and there was “Swift ArgumentParser: Interactive mode” under the topic of Swift Standard Library/ Packages.

The proposal that implement “Swift ArgumentParser: Interactive mode” got selected and the other one didn't. And for some reason, this feature is still in progress and is not merged on main(apple/swift-argument-parser#546). Here is the proposal: https://keithbird.notion.site/Interactive-mode-for-swift-CLI-tool-ArgumentParser-a3ffeaf0256e4ca0b0ce9de5d52a092d, and the issue: apple/swift-argument-parser#449 as a PR, I think), quite a lot of features. I will reach out to him to ask about progress and gather some information.

On the other hand, maybe customizing an interactive CLI for SwiftPM isn’t a bad idea? Here is the description of “Improve CLI User Experience” under Swift Package Manager from 2022’s idea list:

Description: SwiftPM is used in two main ways: As a library integrated into Xcode and as a command line tool. The CLI user experience can be improved by adopting modern presentation techniques about concurrent processes such as build, tests and download progress. SwiftPM already has most of the required information available for presentation, and this work is focused on the design and implementation of a better UX/UI for this information.

So there is more valuable work that we could do.

What do you think? Do you think I should be more realistic and focus on making swift package init interactive first, or contribute to Swift Argument Parser library and benefit other people? Either way, I want to help improve the UX of SwiftPM. I am also very interested in your vision and design, please tell me more about them.

Best, Howard Chu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment