"Fix" the tool not working on Windows #23
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #18
Well.. sort of. It's not really a fix, it's more like ¯\_(ツ)_/¯
After a lot of digging, I found out that the compilation actually runs just fine and the
llvm-ir
gets generated and we can read it, but the piped cargo process just fails mysteriously. Sadly, this infamous Windows error message ("Cannot find the file specified") doesn't give the name of the file or any other context, so I have no idea how to find out what actually happened or how to fix it. So in the end, I changed the code to just ignore the error and try to read thellvm-ir
anyway. This is not ideal, but it at least makes it work on Windows and I feel like it's fine for a tool like this.That said, I found out that this error isn't thrown if I comment out this line in
pipe_to
methodThis effectively disables the piping through
cat
(I think).The problem is that I don't know if that would be ok to do. Can we just not pipe through
cat
? Can that break something on Linux maybe? It's hard for me to understand why is it written this way so I can't really tell. Let me know what do you think would be a good way to resolve this.btw. Some new comments from @nnethercote were really helpful in the process, so big 👏 👏 for that. Last time I had a lot more trouble understanding it ;)