Skip to content

[R] Fix winbuilder check warnings.#11830

Merged
trivialfis merged 11 commits into
dmlc:masterfrom
trivialfis:fix-r-checks
Nov 24, 2025
Merged

[R] Fix winbuilder check warnings.#11830
trivialfis merged 11 commits into
dmlc:masterfrom
trivialfis:fix-r-checks

Conversation

@trivialfis

@trivialfis trivialfis commented Nov 22, 2025

Copy link
Copy Markdown
Member
  • Move files out of the project directory.
  • Improve cache prefix handling for external memory.
  • Fix compiler warnings about function prototype.
  • Restrict threads in examples.

@trivialfis

Copy link
Copy Markdown
Member Author
Found the following significant warnings:
  init.c:61:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  init.c:68:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
See 'd:/RCompile/CRANguest/R-oldrelease/xgboost.Rcheck/00install.out' for details

@trivialfis trivialfis changed the title [wip][R] Fix check warnings. [R] Fix check warnings. Nov 23, 2025
@trivialfis
trivialfis requested a review from Copilot November 23, 2025 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses R package check warnings by making several corrections across the codebase. The changes include proper handling of cache directory paths, updating C function declarations to use proper parameter specifications, relocating configuration headers to the correct directory, and adding thread control directives in R documentation examples.

Key changes:

  • Enhanced cache path handling to properly detect and handle directory inputs in the MakeCachePrefix function
  • Fixed C function declarations to use (void) instead of () for parameterless functions, which is the correct C standard practice
  • Relocated config.h from the R package root to the src/ subdirectory for proper R package structure

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/data/sparse_page_source.cc Added directory detection logic to cache prefix handling and updated copyright year
tests/cpp/helpers.cc Updated test to use MakeCachePrefix wrapper for consistency with production code
ops/script/test_r_package.py Added removal of bootstrap.R file during R package creation
R-package/src/init.c Fixed function declarations to use (void) instead of () for parameterless functions
R-package/src/config.h.in Updated generated file comment to reflect correct path
R-package/configure.ac Changed config header path from config.h to src/config.h
R-package/configure Regenerated configure script with updated config header path
R-package/man/predict.xgb.Booster.Rd Added thread control directive for R CMD check
R-package/man/a-compatibility-note-for-saveRDS-save.Rd Added thread control directive for R CMD check
R-package/R/xgb.Booster.R Added thread control directive in example documentation
R-package/R/utils.R Added thread control directive in example documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/data/sparse_page_source.cc
@trivialfis trivialfis changed the title [R] Fix check warnings. [R] Fix winbuilder check warnings. Nov 23, 2025
@trivialfis
trivialfis merged commit 0b67a40 into dmlc:master Nov 24, 2025
63 checks passed
@trivialfis
trivialfis deleted the fix-r-checks branch November 24, 2025 09:44
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Nov 24, 2025
@hcho3 hcho3 mentioned this pull request Dec 12, 2025
10 tasks
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.

2 participants