-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[R] More compact Roxygen #9875
Comments
Thank you for volunteering! Feel free to open a PR. |
@trivialfis : Beginners question: How do you generate the rd help files in a convenient way? For other packages, I usually run "fatal error: common.h: No such file or directory |
@mayer79 Try to use this in the XGB repo, it's using roxygen:
Inside, it runs: roxygen2::roxygenize() Yes, it does build the package. |
I think you might have cloned the repository without the submodules. You need to use Maybe you could try something like this: git submodule update --init --recursive |
You can avoid needing to rebuild + reinstall every time by passing # build and install the library for the first time
R CMD INSTALL --with-keep.source ./R-package
# re-generate the docs
Rscript -e "roxygen2::roxygenize('R-package/', load = 'installed')"
# (go manually change some roxygen comments)
# re-generate the docs again (no reinstall)
Rscript -e "roxygen2::roxygenize('R-package/', load = 'installed')" (all commands run from the root of the repo) For iterating during local development, you'll probably find that quicker than running |
Both hints (almost) did the trick, thanks a lot! Remaining problem: The first step of @jameslamb fails after some time with a
Do we have an up-to-date docu on how to build the DLL? |
Can you build it with: cd R-package
R CMD INSTALL . |
Thanks for the support, and sorry for the troubles. This gives the same:
Maybe try with a different compiler? |
That's interesting, we run the command on CI xgboost/tests/ci_build/test_r_package.py Line 221 in ae32936
|
Where did you get the R distribution? (apologies for my lack of familiarity with Windows R). |
The R distribution I use on Windows is downloaded from Rtools official site. https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html |
You got me... I was still on rtools40 😇 |
That's even more interesting, you have a line in the log:
which shows rtools43. |
At least the path variable was pointing to C:/rtools40... let's see what I get with clean environment variables. |
A different error message pops up: Is g++ version too high?
|
No, I don't think the compiler version can be "too high" for C++ code. Judging from:
I think you have a mix of R/C++ environments and they got messed together, the compiler is using the wrong standard library. |
@trivialfis Thanks your your patient assistance! A simple
|
Excellent! That's probably caused by the binaries compiled before you upgrade your toolchain to 4.3. If I guess right, the second run after the first successful compilation should not require the preclean option. |
Roxygen is now closer to Markdown. E.g., instead of the verbose
one can write
This makes the docstrings easier to read.
I can work on this, if nobody has any objections.
xgb.serialize.Rxgb.unserialize.RThe text was updated successfully, but these errors were encountered: