xcstrings-tool icon indicating copy to clipboard operation
xcstrings-tool copied to clipboard

Prevent symbol conflicts when using `accessLevel: public` across multiple packages

Open markst opened this issue 6 months ago • 1 comments
trafficstars

Describe the problem

When using XCStringsToolPlugin across multiple Swift packages, setting accessLevel: public in just one package's xcstrings-tool-config.yml causes a conflict if other packages also generate a Localizable symbol (even with default internal access level).

The compiler reports:

'Localizable' is ambiguous for type lookup in this context

This happens because one module exports Localizable publicly, while others still generate the same symbol internally — leading to ambiguity when multiple modules are imported into the same target.

Steps to Reproduce

  1. Add .xcstrings files to two Swift packages: PackageA and PackageB
  2. Set accessLevel: public in PackageA’s config only
  3. Leave PackageB with default or internal
  4. Import both packages into an app target
  5. Use Localizable.someString

markst avatar May 08 '25 01:05 markst