You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sufficiently confuses the Swift namespacing system, preventing all of your package users from being able to use the symbol Experiment in their own projects.
Example
If a user has implemented their own Experiment type AND wants to access yourExperiment (even while explicitly referencing your module name), like so:
let foo = Experiment.Experiment.initializeWithAmplitudeAnalytics(apiKey:...
...the net result is that the Swift compiler will disambiguate this by preferring to search within the user-owned implementation, first, instead of this package's implementation.
That is, in the above example, the Swift compiler will look in the user's project (not your package) for:
In our project, we'd like to use the symbol name
Experiment
(for a property wrapper, if you're wondering).However, this project implements both:
Experiment
Experiment
(e.g. this object)This sufficiently confuses the Swift namespacing system, preventing all of your package users from being able to use the symbol
Experiment
in their own projects.Example
If a user has implemented their own
Experiment
type AND wants to access yourExperiment
(even while explicitly referencing your module name), like so:...the net result is that the Swift compiler will disambiguate this by preferring to search within the user-owned implementation, first, instead of this package's implementation.
That is, in the above example, the Swift compiler will look in the user's project (not your package) for:
Request
This design choice prohibits your users from using a useful, common symbol name.
Please give us
Experiment
back. :)The text was updated successfully, but these errors were encountered: