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.
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
[ci] add CMake + R 3.6 test back (fixes #3469) #4053
[ci] add CMake + R 3.6 test back (fixes #3469) #4053
Changes from 2 commits
25c57d3
558784a
6f0b876
0d67e7e
aff80c9
03d9eb2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about to remove this particular directory physically?
Looks like there could be conflicts during our own installation (but for R 4.x job)
LightGBM/.ci/test_r_package_windows.ps1
Line 45 in 3a5e3c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally had something like
Remove-Item "C:\rtools40" -Recurse"
, but it was failing with an error saying something like "insufficient permission to remove this, must be an administrator or this may be a system file" (don't remember the exact error message).Although, I was just looking at your work in RGF...maybe we could borrow your solution from there to get past that error? 😀
https://github.com/RGF-team/rgf/blob/ab328a01d3af809c0c1fd4122d8b70b9fb2e9757/.ci/r_tests_windows.ps1#L20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so! This command takes some time (several seconds) but I think it won't be excess and can protect us from some other problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I don't know why, but I had to manually install
qpdf
for Windows R jobs (I chosepacman
package manager because it's bundled with Rtools and one-line solution) to pass--as-cran
checks for vignettes.Maybe this info will help you to save some time on other projects or even here in LightGBM.
https://github.com/RGF-team/rgf/blob/ab328a01d3af809c0c1fd4122d8b70b9fb2e9757/.ci/r_tests_windows.ps1#L42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! Maybe we'll have to worry about
qpdf
on #3946 , actually, so that is timely advicceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these paths all had some msys2 or mingw components in them.
I dumped the full PATH below so you can see what's there, including why I needed both
chocolatey
andChocolatey
😂full contents of PATH before removals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to look this up, but Strawberry is a perl environment for Windows: https://strawberryperl.com/. It's Program Files contain some mingw tools used to compile C programs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use
Start-Process -FilePath Rtools.exe -NoNewWindow -Wait -ArgumentList ...
above to not wait manually?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Seems I missed that:
Indeed, very interesting observation! 👍
Given that, please ignore my comment above about
-Wait
argument (it will not help). Instead, I believe we should do something likeinstead of hardcoded
sleep(60)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱 I didn't know about
-Wait
! I don't write Powershell code anywhere else except this one script in this project, so I'm not very knowledgeable about it. Yes that seems a lot better than a sleep! Let me try that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you think that writing all files into
mingw_64
takes some significant time and this is not just about delay inmingw_64
folder creation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ha we posted our responses at about the same time, I didn't see your second comment.
I don't think this
while
loop approach isexactly correcta reliable fix. The directorymingw_64
could exist without all of the other files and folders in it being populated yet. This is what I meant by this explanation in the PR descriptionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see... Could then please try
-Wait
workaround in RDP before merging this? I'm not an expert in PowerShell too, so maybe some magic will happen 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! I won't be able to test it until later tonight though, maybe 6-8 hours from now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem!
Maybe this is indeed a "recommended" official way of installation:
https://github.com/r-windows/rtools-base/blob/e60c36de70de7dedce89577c11d2fbe6008b2df4/scripts.ps1#L39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice, I forgot about
r-windows/r-tools
. I vaguely remember reading a blog post about it once. If that's how Jeroen does it, it's definitely a good sign.Happy to say that switching to a
-Wait
did work! I could see that the Rtools install command didn't return control to powershell until bothming_32
andmingw_64
directories were created.