Skip to content

Commit

Permalink
Ensure file path isn't percent encoded in the plugin (#2086)
Browse files Browse the repository at this point in the history
Motivation:

In Swift 6, SwiftPM deprecated its Path based API for plugins and moved
to Foundation's URL. On Darwin, getting the path of a URL percent
encodes it which leads to build issues in Xcode.

Modifications:

- Make sure the path isn't percent encoded

Result:

- Plugin works again
- Resolves #2085
  • Loading branch information
glbrntt authored Oct 7, 2024
1 parent 183fe93 commit cfdce07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugins/GRPCSwiftPlugin/plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ struct PathLike: CustomStringConvertible {
#if compiler(<6.0)
return String(describing: self.value)
#elseif canImport(Darwin)
return self.value.path()
return self.value.path(percentEncoded: false)
#else
return self.value.path
#endif
Expand Down

0 comments on commit cfdce07

Please sign in to comment.