Proposal: Extract POSIX module from swift-package-manager


(Adam Sharp) #1

Hi,

What do you think about about the idea of extracting the POSIX module out into a new project, say swift-posix?

I'm very excited about Swift becoming a viable language for writing tools and scripting. To that end, I think it would be extremely valuable to have a standard Swift module for interacting with the system and the shell.

Currently it's possible for me to add SPM as a dependency in a package, and import the POSIX module myself. However it would be great for the community to be able to contribute fixes or new features if they're generally useful, and those changes may be orthogonal to the direction of SPM itself. In the future it may also be valuable to be able to consider new abstractions over the POSIX layer that would be breaking changes for SPM---thus, a separate package could have its own semantic version, enabling that kind of evolution.

SPM is off to an excellent start in my opinion. Congratulations to the team!

–Adam


(Max Howell) #2

Hi,

What do you think about about the idea of extracting the POSIX module out into a new project, say swift-posix?

I'm very excited about Swift becoming a viable language for writing tools and scripting. To that end, I think it would be extremely valuable to have a standard Swift module for interacting with the system and the shell.

Currently it's possible for me to add SPM as a dependency in a package, and import the POSIX module myself. However it would be great for the community to be able to contribute fixes or new features if they're generally useful, and those changes may be orthogonal to the direction of SPM itself. In the future it may also be valuable to be able to consider new abstractions over the POSIX layer that would be breaking changes for SPM---thus, a separate package could have its own semantic version, enabling that kind of evolution.

I will keep this suggestion in mind, but primarily I am concerned because the SwiftPM must bootstrap itself from a system where it is not already installed, thus splitting modules into separate packages will add complexity to our build process.

However once we support scripting with the ability to use packages I agree that the POSIX module will be useful.

SPM is off to an excellent start in my opinion. Congratulations to the team!

Thanks :slight_smile: