Repository navigation
[ci] [R-package] use a Windows-specific download link for SWIG, stop using '<<-' in R code - #7364
Conversation
|
@jameslamb If you'd like to avoid updating the version string manually on each SWIG release, SourceForge exposes a best_release.json API that returns per-platform download info: $releaseInfo = Invoke-RestMethod "https://sourceforge.net/projects/swig/best_release.json"
$swigFilename = $releaseInfo.platform_releases.windows.filename
# e.g. "/swigwin/swigwin-4.4.1/swigwin-4.4.1.zip"
$params = @{
Uri = "https://sourceforge.net/projects/swig/files$swigFilename/download"
OutFile = "$env:BUILD_SOURCESDIRECTORY/swig/swigwin.zip"
UserAgent = "curl"
}Works on my forked repo! π |
|
oooooo that'd be great, thanks for the suggestion @maxzw ! lemme try that |
|
good news: that change worked for the SWIG builds, yay! bad news: in the time this has been open we have another CI failure (#7365) π I'll push changes for that too. |
| best_score <- NULL | ||
| best_msg <- NULL | ||
| eval_len <- NULL | ||
| cb_state <- new.env() |
There was a problem hiding this comment.
This set of changes to the R code is a fix for #7365 .
We got an exception (maybe a manual override?) early on from CRAN for use of <<- in the package and maybe that'd last forever, but that is a risk of rejected submissions so I think it's worth just fixing this now and forever.
I'm confident that these changes are well-covered by existing tests.
|
|
||
| # skip R files fromthird-party dependencies | ||
| FILES_TO_LINT <- FILES_TO_LINT[ | ||
| !grepl("external_libs/|site-packages/", FILES_TO_LINT, fixed = TRUE) |
There was a problem hiding this comment.
nanoarrow was added as a git submodule in #7275, and it has some R code in it.
We didn't catch that in CI because we skip populating submodules for the linting job:
But I have them populated locally and get a bunch of linting errors for that R code when I run like
Rscript .ci/lint-r-code.R $(pwd)The site-packages/ addition here is because I had a root-level venv and... scipy has R code in it!
| , label = train$label | ||
| , params = params | ||
| , nrounds = 2L | ||
| , num_threads = .LGB_MAX_THREADS |
There was a problem hiding this comment.
This suppresses this warning:
Lines 227 to 242 in 75c0190
I noticed this while testing locally... I think it could be a problem when we go to release to CRAN. These tests fail if {RhpcBLASctl} is not installed, because that causes a warning to be raised and they run expect_silent().
I don't think these tests have gone through a CRAN check yet.
opened an issue about testing that in CI: #7367 (can be done in a follow-up at some point)
|
Thanks @shiyu1994 ! |
Fixes #7363
That 12 hours of CI working was glorious, wasn't it? π
Looks like SWIG's
/latest/downloadlink now serves a.tar.gzof the source code, not a.zipof binaries. That broke SWIG CI jobs on Windows.This switches that CI job to a Windows-specific URL.