Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove percent-encoded chars in build plugin paths #32

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

rnro
Copy link
Collaborator

@rnro rnro commented Jan 21, 2025

Motivation:

Xcode provides paths to executables as strings referencing environment variables and then passes those strings to the build plugin as URLs. This meant that when we converted these URLs to strings they percent-encoded some characters and were no longer valid paths e.g.

/${BUILD_DIR}/${CONFIGURATION}/protoc-gen-swift

became

/$%7BBUILD_DIR%7D/$%7BCONFIGURATION%7D/protoc-gen-swift

Modifications:

Have our utility function for accessing absolute paths as strings strip percent-encoding.

Result:

The build plugin works in Xcode

Motivation:

Xcode provides paths to executables as strings referencing environment
variables and then passes those strings to the build plugin as URLs.
This meant that when we converted these URLs to strings they percent-encoded
some characters and were no longer valid paths e.g.

```
/${BUILD_DIR}/${CONFIGURATION}/protoc-gen-swift
```
became
```
/$%7BBUILD_DIR%7D/$%7BCONFIGURATION%7D/protoc-gen-swift
```

Modifications:

Have our utility function for accessing absolute paths as strings strip
percent-encoding.

Result:

The build plugin works in Xcode
@rnro rnro requested a review from glbrntt January 21, 2025 16:59
@rnro rnro added the 🔨 semver/patch No public API change. label Jan 21, 2025
@glbrntt glbrntt merged commit 0e6d93b into grpc:main Jan 21, 2025
21 of 22 checks passed
@rnro rnro deleted the build_plugin_xcode branch January 21, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants