GH-16360: Fix R package for Windows #16369
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.
#16360
The Windows usually don't allow opening one file by multiple processes and that seems to cause this issue.
In python, it seems like we are using the same process group which IIRC could mitigate the issue we're seeing in R.
Last time I programmed on Windows, Delphi was a big thing and Windows XP was the latest version so my knowledge of that "operating system" is pretty limited. So I'm trying to keep it simple and multiplatform without delving into windows' and R's internals.
My solution is to add the
web_ipto the json we send when H2O connects and then check on R side if it's null and if so print the warning. This way we print it every time onh2o.initand also onh2o.connect(which I think is a good thing) but it makes the behavior between R and Python diverge a bit.@mmalohlava JFYI this related to #15683 which you were involved in.