Skip to content

Example using a WKT#1979

Draft
thomasvl wants to merge 1 commit intoapple:mainfrom
thomasvl:swiftpm_plugin_uses_wkts
Draft

Example using a WKT#1979
thomasvl wants to merge 1 commit intoapple:mainfrom
thomasvl:swiftpm_plugin_uses_wkts

Conversation

@thomasvl
Copy link
Copy Markdown
Collaborator

This does not work with the protoc built locally because the WKTs aren't found. If you try building using the env variable to provide a full protoc install, then it works since that bundles all the WKTs and the proto compiler auto finds the bundled files.

See #1943 for some of the research into options in this space.

This does not work with the protoc built locally because the WKTs aren't found.
If you try building using the env variable to provide a full `protoc` install,
then it works since that bundles all the WKTs and the proto compiler auto finds
the bundled files.

See apple#1943 for some of the research into options in this space.
@FranzBusch
Copy link
Copy Markdown
Member

This does not work with the protoc built locally because the WKTs aren't found

Would be great if we can fix that as well. Is it just about building them and adding a -I?

@thomasvl
Copy link
Copy Markdown
Collaborator Author

This does not work with the protoc built locally because the WKTs aren't found

Would be great if we can fix that as well. Is it just about building them and adding a -I?

Either we provide a -I directive to point to all the files, or we bundle the files next to the binary the startup code can auto find them.

@FranzBusch
Copy link
Copy Markdown
Member

This does not work with the protoc built locally because the WKTs aren't found

Would be great if we can fix that as well. Is it just about building them and adding a -I?

Either we provide a -I directive to point to all the files, or we bundle the files next to the binary the startup code can auto find them.

I don't think we can move the files next to the binary since when protoc is built from source the binary is somewhere in the build directory. It seems like the best path forward is for the Swift PM plugin to add a -I directive into the submodule where the WKTs are.

@thomasvl
Copy link
Copy Markdown
Collaborator Author

This does not work with the protoc built locally because the WKTs aren't found

Would be great if we can fix that as well. Is it just about building them and adding a -I?

Either we provide a -I directive to point to all the files, or we bundle the files next to the binary the startup code can auto find them.

I don't think we can move the files next to the binary since when protoc is built from source the binary is somewhere in the build directory. It seems like the best path forward is for the Swift PM plugin to add a -I directive into the submodule where the WKTs are.

The resources support seems like it should do this (not the exact structure we need), but I couldn't figure out how to make SwiftPM resources work at all for the plugin binary.

And I didn't see any way to get a path back to where the sources for the plugin exist on disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants