-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Package.swift not at the root of the repository #5768
Comments
|
@elsh @neonichu @abertelrud wdyt? |
|
+1 in general, but I think there are some issues that need to be carefully considered:
|
|
May I ask how the package identity works? As far as I know, it works for git repositories and for local folders. Is that identity somehow the "path" to the package? Also is there a change I could possibly contribute that, or does it look like a complex, fundamental contribution? Would you have pointers to where I should look in the code if I wanted to try it? |
|
In the common case, the package identity is basically the last path component of the Git URL or local path. My guess is that it would be good to combine I can provide some pointers, at a high level, we'd need to incorporate the new parameter into the In general, since this is a change with impact on the public API of the package manifest, it would need to go through the evolution process. Typically, that would start with a pitch on the Swift forums and later require a formal proposal + implementation. |
|
Thanks for the info! I pitched it here: https://forums.swift.org/t/allow-package-swift-to-not-be-at-the-root-of-the-repository/60431 I guess the discussion on the forum can replace this one, so I'll close it. |
Description
A Swift package must be released as a git repository with a
Package.swiftfile at its root, and with a specific layout.There has been discussions about allowing a custom layout years ago (see #5339), but this is slightly different.
Say I have a library that I provide in multiple languages (e.g. c++, java, python, swift), and I have all my code in one repository, like this:
That works for all but swift, because it wants to be at the root. Wouldn't it make sense to allow for that? Then inside of
swift/it would just be a normal swift package (withPackage.swiftand the required directory layout). It would just not sit at the root.It feels like it would not require very big changes in SwiftPM, and the syntax for using such a package could be something like:
Would that make any sense at all?
The text was updated successfully, but these errors were encountered: