-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rename PackageGraph type to ModulesGraph
#7363
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
Conversation
We have to operate on two different graphs in the `PackageGraph` module: 1. A graph of packages in PubGrub package resolution code; 2. A graph of resolved products and modules that belong to those products. Currently the second graph is misleadingly called `PackageGraph`, although that name is much more suitable for the first graph. This naming is confusing and unfortunate, and can be especially misleading for first-time contributors. We should better document the SwiftPM resolution and build pipeline in the future, but cleaning up naming is the first step. In the short term we should also split the `PackageGraph` module into `PubGrub` and `ModulesGraph` modules, but for now I'm renaming a single type to keep the PR manageable.
|
@swift-ci test |
bnbarham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the short term we should also split the PackageGraph module into PubGrub and ModulesGraph modules, but for now I'm renaming a single type to keep the PR manageable.
Is PubGrub an implementation detail, or will it always be fundamental to the package resolution? Another name for the module would just be PackageResolution 😅.
ModulesGraph... Is that more of a TargetGraph? I notice our docs talk about "module" so maybe that does make sense, I just find it a little odd for eg. executables.
I would prefer to keep
The
In a follow-up PR I'd like to rename Another argument for "modules" instead of "targets" in this context is that we already have "module aliases" and not "target aliases", even though module aliases are attached per target in |
For this one specifically: every executable still has an underlying module, IIUC we even generate a Clang module for C/C++ targets, so IMO this naming is general enough to be applicable to executables too. |
Yeah but that's where it doesn't really fit - we have an underlying module, but the executable is still a "module" in this scheme. I don't really have a better suggestion TBH and I understand the motivation for switching from target, so I'm not going to block it. Just thought it was worth mentioning. |
We have to operate on two different graphs in the `PackageGraph` module: 1. A graph of packages in PubGrub package resolution code; 2. A graph of resolved products and modules that belong to those products. Currently the second graph is misleadingly called `PackageGraph`, although that name is much more suitable for the first graph. This naming is confusing and unfortunate, and can be especially misleading for first-time contributors. We should better document the SwiftPM resolution and build pipeline in the future, but cleaning up naming is the first step. I'm keeping old names as deprecated overloads or typealiases to make migration easier for SwiftPM clients. This renaming has no impact on any public stable modules like `PackageDescription`. In the short term we should also split the `PackageGraph` module into `PubGrub` and `ModulesGraph` modules, but for now I'm renaming a single type to keep the PR manageable.
We have to operate on two different graphs in the `PackageGraph` module: 1. A graph of packages in PubGrub package resolution code; 2. A graph of resolved products and modules that belong to those products. Currently the second graph is misleadingly called `PackageGraph`, although that name is much more suitable for the first graph. This naming is confusing and unfortunate, and can be especially misleading for first-time contributors. We should better document the SwiftPM resolution and build pipeline in the future, but cleaning up naming is the first step. I'm keeping old names as deprecated overloads or typealiases to make migration easier for SwiftPM clients. This renaming has no impact on any public stable modules like `PackageDescription`. In the short term we should also split the `PackageGraph` module into `PubGrub` and `ModulesGraph` modules, but for now I'm renaming a single type to keep the PR manageable.
We have to operate on two different graphs in the `PackageGraph` module: 1. A graph of packages in PubGrub package resolution code; 2. A graph of resolved products and modules that belong to those products. Currently the second graph is misleadingly called `PackageGraph`, although that name is much more suitable for the first graph. This naming is confusing and unfortunate, and can be especially misleading for first-time contributors. We should better document the SwiftPM resolution and build pipeline in the future, but cleaning up naming is the first step. I'm keeping old names as deprecated overloads or typealiases to make migration easier for SwiftPM clients. This renaming has no impact on any public stable modules like `PackageDescription`. In the short term we should also split the `PackageGraph` module into `PubGrub` and `ModulesGraph` modules, but for now I'm renaming a single type to keep the PR manageable.
We have to operate on two different graphs in the
PackageGraphmodule:Currently the second graph is misleadingly called
PackageGraph, although that name is much more suitable for the first graph. This naming is confusing and unfortunate, and can be especially misleading for first-time contributors. We should better document the SwiftPM resolution and build pipeline in the future, but cleaning up naming is the first step.I'm keeping old names as deprecated overloads or typealiases to make migration easier for SwiftPM clients. This renaming has no impact on any public stable modules like
PackageDescription.In the short term we should also split the
PackageGraphmodule intoPubGrubandModulesGraphmodules, but for now I'm renaming a single type to keep the PR manageable.