While reading through the Swift Package Manager Documentation (Swift.org - Package Manager), I was confused by some parts that did not fit my current understanding (which I derived from working with Package.swift files). I would love to know whether my understanding or the documentation is wrong :
"Each target specifies a product […]"
My understanding is that a product includes one or more targets, but a target does not specify a product.
"A target may build either a library or an executable as its product."
My understanding is that a product (not a target) may be/build either a library or an executable.
"A target’s dependencies are modules that are required by code in the package."
My understanding is a target's dependency can be a module (target) if and only if that module is in the same package. For dependencies outside the package, a target's dependency can only be a product, not a module. This becomes visible if the names are not equal. Example: If we have a package APkg that has a library product ALib that contains targets ATarget and BTarget, a target of another package could dependend on the product ALib in APkg, but not on the modules/targets ATarget and BTarget individually.
If my understanding is correct, what would be the best way to get the documentation updated? If not, could someone clarify where I am off?