Files
George Barnett d44ea38550 Add WKT import path directly to protoc binary (#2060)
Motivation:

The recent changes to the build plugin only add import paths to the
SwiftPM entrypoint. The Xcode plugin entrypoint doesn't have appropriate
support to add an import for the WKTs.

Another limitation of the current approach is that users building and
using `protoc` from the pacakge (i.e. `swift build --product protoc`)
won't get the WKT include paths.

This changes takes a different approach by rewriting the entrypoint to
protoc to unconditionally add the WKT include path. This means WKTs work
for the SwiftPM plugin, Xcode plugins, and when using `protoc` directly.
It also obviates the need for downstream pacakges depending on `protoc`
in their plugins (e.g. gRPC) to scan for the include paths in their
plugins.

Modifications:

- Add a new 'main.cc' which does what 'main_no_generators.cc' does but
  adds the WKT include path to the invocation.
- Remove 'main_no_generators.cc' and update the vendoring script to
  prune it out.
- Revert recent changes to the SwiftPM plugin which scanned for protobuf
  sources for the include path

Result:

WKTs work with protoc in more places
2026-05-12 15:50:05 +00:00
..