How can I create a proposal to change the Target
name in the SPM to Module
. because it's very confusing, developers always say Modules
not Target
. For people who don't know that as me in the beginning will struggle because they will not find any Module
keyword in the SPM. And no one uses the term Target
even apple in the WWDC24 session for swift tour they used the term Modules
.
+1
It’s also consistent with Bundle.module
I kind of like the current module/target duality (if I have it right)...
Module to me is the code-driven perspective about the local containing world, while target is the build-driven perspective about one of many things being built and assembled.
So for code scope, the term is module, and the concerns are visibility, reachability, etc. For product assembly, it's target, and concerns are identity, version compatibility, composability, etc. One perspective is inside-looking-out and the other is outside-looking-at. It's like the difference between a self and a person.
Yes, they might end up in the same build artifact at this moment in Swift history, but using different terms helps set the context, and I can easily imagine the distinction being relevant at other points in Swift history -- e.g., in a world each source language in a target had a distinct module.
To me the solution to the confusion is for documentation to directly and clearly distinguish the terms.
My interpretation always was: there are targets and targets. Targets that “do something” (executable targets, test targets) and targets that exist for modularization sake.
What I propose is: all targets (as in things that “do something”) are always modules as an executable target and test target also contain modularization. Therefore i agree with renaming the general terms: “.target”, “Target” and “targets” to modules. But keep the special terms “executableTarget” and “testTarget” as specialized cases of modules.