-
Notifications
You must be signed in to change notification settings - Fork 154
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
Error converted from warning prevents package install when dependency was built under newer R version #403
Comments
See |
Worked. Thanks. |
Just a short comment in case you are considering to change this default setting of The functionality to easily install from Github you provide is really great. But I found it extremely confusing that warnings are by default converted to errors. It took me a lot of time to figure out why the installations of some Github packages did not work. For me it would have been much easier if you had followed the default R convention to only throw an error if somebody set When I got such a warning error from I am not sure whether your assessment is empirically true for Github packages:
I think particular on Github there are packages that have been programmed quickly and don't follow all CRAN guidlines. (Several of my own packages are such bad examples). For non CRAN compliant packages there can be many relatively irrelevant warnings like
or
I personally see Github a bit as a land of freedom where I can write quickly packages without spending a lot of time to adhere to all CRAN conventions. But the new In short, this is just +1 for not converting warnings to errors by default. |
Just want to drop in to join the argument against this default. Failing a package build because of the warning that a different package was built in a slightly newer version seems a bit much... the user could at least be presented with an option to continue, if in interactive mode... |
That is not possible, because the installation runs in a subprocess by |
Even though I am late to this discussion I'd like to give my 2 cents on this. After a lot of searching I found out that the reason why people got an error trying to install my ggcharts package is because of this behavior to convert all warnings to errors. Most
is wrong. I would thus strongly suggest to change this behaviour. After all, why be stricter than |
+1 for changing the default behaviour to ignore warnings |
It looks like this behaviour is causing a lot of pain so I think we should reconsider. It seems like the other failure mode (apparent install success but actual install failure with warning) is less common. |
Hi, I am getting a similar message (shown below) can you please tell me what your resolution was. I am not clear from the thread. Error: (converted from warning) package 'ExperimentHub' was built under R version 4.0.2 |
See #403 (comment), you can set the environment variable with |
This issue will cause many people difficulty installing R libraries and adopting R. 😬 |
What do you mean? |
Still seeing this:
Would someone care to fix this? At least give |
Just a short comment from an outsider given that the discussion seems to continue. If I understand correctly, the issue has been fixed by Jim Hester on August 6th in this commit as is also stated in the package NEWS. Many thanks for changing the default. It will probably take some time until the fix is on CRAN and more time until most R users have the new |
Users not updating their packages is always an issue, but this report came from a user who claimed they had the latest |
You can control this behavior with an environment variable
As mentioned in the readme https://github.com/r-lib/remotes#environment-variables |
So this is what I put into my readme.md. # install.packages("remotes")
#Turn off warning-error-conversion, because the tiniest warning stops installation
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
#install from github
remotes::install_github(MYPACKAGE) |
I am also still getting this error with many of my GitHub packages even with the new remotes update. This error is particularly frustrating: "Install fails due to "package '...' was built under R version 4.0.X" so install breaks as soon as a new R version is released and CRAN packages are rebuilt. Adding the bit to the Readme works, but then users either have to know to look there or I have to add the |
This is a major obstacle. It would help to have an argument like |
what's the status of adding functionality to suppress the upgrading of a warning to an error? I just encountered this myself and only surmounted it using @ninohardt recommendation. |
@tfalcs The latest release version (2.2.0 on CRAN or github) is from July and thus still converts warnings to errors. |
I'm a bit late to this discussion but also would like to add my word. I strongly suggest changing default behavior as in I'm opinion it's strongly damaging to people that are using R packages from git. Although many of those packages work, they not always follow all CRAN rules, for instance for clean documentation. Keep in mind that installation loads dependencies of a package. I struggled a lot to fix a problem when one of the dependencies raised replacing imports warning at load and thus installation of other package failed. I ended up downloading the repo with git2r to tmp and installing it from a source which is exactly what remotes::install_git should do... Please at least add a parameter that bypasses that damaging default option. |
The default as of remotes 2.3.0 is not to convert warnings to errors. If you want the previous default you can set the environment variable |
I am having R version 3.6.0 in Windows, and when I try to use
remotes::install_github
I get this an error converted from a warning thatpackage 'x' was built under R version 3.6.1
. I was trying to override the behaviour at the function call level usingdependencies=FALSE
to no avail.Is this warning-to-error conversion really necessary in this case? Seems to me a bit overkill for same major R version.
The text was updated successfully, but these errors were encountered: