Skip to content

Conversation

jhump
Copy link
Owner

@jhump jhump commented Jul 13, 2020

This is an attempt to make this repo work correctly on Windows -- at least verifying that tests pass 🤞

Hopefully, we can get this branch green and resolve #335

@bufdev
Copy link
Contributor

bufdev commented Jul 13, 2020

Oh this is going to be a fun one. If it passes on the first run, I'll be impressed :-)

@rogchap
Copy link

rogchap commented Aug 29, 2020

Any progress? Would be great to have Windows support.

@jhump
Copy link
Owner Author

jhump commented Mar 16, 2022

Finally getting around to trying this out on an actual Windows PC and.... it passes, all green.

When installing git for Windows, it did ask me about line ending conventions. I configured it to checkout "as is" and push "as is" (e.g. don't attempt to do any LF-> CRLF -> LF conversions/mangling to accommodate dumb Windows tools that expect CRLF). And it passed all tests first try.

So I am pretty sure that the build failure, which indicates a line ending issue, is because the Travis CI machine that was running the build was configured to convert line endings on checkout. So the test files had different line endings and therefore some of the line endings and source position information in source code info was different than expected (the expectations are all based on the files "as is" with simple LF line endings).

I still need to re-base this PR and update it to have Circle CI run the tests on Windows. But one thing that is missing is a test file that deliberately has Windows-style line endings, to make sure that things like source info and comments emitted by protoparse match the behavior of running protoc on Windows.

@jhump jhump force-pushed the jh/make-desc-pkg-work-on-windows branch 3 times, most recently from b8cfcf3 to f6cb17c Compare March 16, 2022 21:23
@jhump jhump force-pushed the jh/make-desc-pkg-work-on-windows branch from f6cb17c to 49a3dfe Compare March 16, 2022 21:26
@jhump jhump merged commit 1fd73d2 into master Mar 16, 2022
@jhump jhump deleted the jh/make-desc-pkg-work-on-windows branch March 16, 2022 21:28
@jhump
Copy link
Owner Author

jhump commented Mar 16, 2022

But one thing that is missing is a test file that deliberately has Windows-style line endings, to make sure that things like source info and comments emitted by protoparse match the behavior of running protoc on Windows.

I'll have to deal with this part later. For now, the fix in the first commit (combined with turning off crlf conversion in git in CI) gets the build green. So this seems like a valuable partial, so that Windows users are mostly able to make use of this repo.

@jhump
Copy link
Owner Author

jhump commented Mar 16, 2022

@rogchap, apologies for the long delay. Do take a look at latest master and file a new issue if you see something else that is still messed up on Windows.

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.

LoadFileDescriptor with dependency proto fails on Windows
3 participants