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

Update protoc-gen-start dependency and add filepath.ToSlash() to fix #611 #612

Merged
merged 5 commits into from Sep 19, 2022

Conversation

nvx
Copy link
Contributor

@nvx nvx commented Jul 12, 2022

Required more than just the dependency update, also had to add in filepath.ToSlash() to fix the module parameter issue.

…ufbuild#611

Signed-off-by: Tiernan Messmer <tiernan.messmer@jcu.edu.au>
@nvx
Copy link
Contributor Author

nvx commented Jul 12, 2022

Looks like the build is failing due to some unrelated python protoc version issues? As far as I can tell my PR is fine. Hesitant to regenerate files that are unrelated to the PR and pollute the commits.

Signed-off-by: Elliot Jackson <elliot@elliotmjackson.com>
@elliotmjackson
Copy link
Contributor

Hi @nvx, thanks for your patience with this PR. I don't quite understand whats happening here...

ToSlash returns the result of replacing each separator character in path with a slash ('/') character. Multiple separators are replaced by multiple slashes.

we have a replace all func to create the path, and a ToSlash func to perform the same operation... please explain 👓

@nvx
Copy link
Contributor Author

nvx commented Sep 16, 2022

Hi @nvx, thanks for your patience with this PR. I don't quite understand whats happening here...

ToSlash returns the result of replacing each separator character in path with a slash ('/') character. Multiple separators are replaced by multiple slashes.

we have a replace all func to create the path, and a ToSlash func to perform the same operation... please explain 👓

#611 describes the issue that this PR fixes. The filepath.ToSlash func is required to translate backslashes on Windows to forward slashes as the module name always uses forward slashes, as does the TrimLeft function call.

Copy link
Contributor

@elliotmjackson elliotmjackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@elliotmjackson
Copy link
Contributor

It is worth noting, i have upgraded PGS so this issue is likely already solved in v0.6.8

@nvx
Copy link
Contributor Author

nvx commented Sep 19, 2022

It is worth noting, i have upgraded PGS so this issue is likely already solved in v0.6.8

I noticed that, and updating PGS is also needed, but I found just updating PGS wasn't enough, the ToSlash change is also needed.

@elliotmjackson elliotmjackson merged commit 05f8c12 into bufbuild:main Sep 19, 2022
@nvx nvx deleted the bugfix/windows_paths branch September 21, 2022 08:10
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.

None yet

2 participants