-
Notifications
You must be signed in to change notification settings - Fork 29
Description
While trying to regenerate protobuf in hcsshim, I hit a surprising behaviour.
I was running this on Windows, and
protobuild github.com/Microsoft/hcsshim/internal/shimdiag
was not honouring the existing override in Protobuf.toml:
[[overrides]]
prefixes = ["github.com/Microsoft/hcsshim/internal/shimdiag"]
plugins = ["ttrpc"]
After much poking about, I found this works:
[[overrides]]
prefixes = [
"github.com/Microsoft/hcsshim/internal/shimdiag",
"github.com\\Microsoft\\hcsshim\\internal\\shimdiag",
]
plugins = ["ttrpc"]
Is this expected behaviour? I had expected (from my very limited exposure to this tool) that all these paths were in "Go package path" format, rather than being filesystem paths.
I only worked out what was going on when I noticed that the prefix being looked up is defined with filepath.Rel, and perhaps filepath.ToSlash should be used on the result before further processing? Or perhaps that would also be surprising for packages defined on the filesystem. (I don't know if Go enforces /-separators in that case or not.)
This is with protobuild 6b023c6, rather than 0.1.0, due to #46.