Skip to content
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

Test installation for development versions of dependencies without Remotes field #991

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

m7pr
Copy link
Contributor

@m7pr m7pr commented Feb 4, 2025

This is just to illustrate what happens, if your package (rtables) depends on a development version of a dependency (in this case formatters (0.5.10.9000).

Installation function tries to pull the package only from the known sources (in this case CRAN). The highest available version on CRAN is 0.5.10. It is pulled, but then it is verified with the DESCRIPTION requirements that state 0.5.10.9000 is needed, and the installation fails. There is no information on where to pull 0.5.10.9000 from. If you would have Remotes: insightsengineering/formatters included in the DESCRIPTION, the installation procedure would not fail, and would pull the dependency from GitHub.

remove.packages(c('formatters', 'rtables'))
remotes::install_github('insightsengineering/rtables@test_no_remotes', upgrade = 'never')

Output

Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.
Downloading GitHub repo insightsengineering/rtables@test_no_remotes
Installing 1 packages: formatters
Installing package intoC:/Users/m7pr/AppData/Local/R/win-library/4.4’
(aslibis unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.4/formatters_0.5.10.zip'
Content type 'application/zip' length 2805602 bytes (2.7 MB)
downloaded 2.7 MB

packageformatterssuccessfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\kosinsm4\AppData\Local\Temp\RtmpAtTWgB\downloaded_packages
Addingformatters_0.5.10.zipto the cache
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\kosinsm4\AppData\Local\Temp\RtmpAtTWgB\remotes68a83b58c2f\insightsengineering-rtables-3f0550d/DESCRIPTION' (407ms)
─  preparing 'rtables': (340ms)
✔  checking DESCRIPTION meta-information ...checking for LF line-endings in source and make files and shell scripts (728ms)
─  checking for empty or unneeded directories
   Omitted 'LazyData' from DESCRIPTIONbuilding 'rtables_0.6.11.9002.tar.gz'
   
Installing package intoC:/Users/kosinsm4/AppData/Local/R/win-library/4.4’
(aslibis unspecified)
* installing *source* package 'rtables' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: package 'formatters' 0.5.10 was found, but >= 0.5.10.9000 is required by 'rtables'
Execution halted
ERROR: lazy loading failed for package 'rtables'
* removing 'C:/Users/kosinsm4/AppData/Local/R/win-library/4.4/rtables'
Warning messages:
1: In utils::install.packages(pkgs = pkgs, lib = lib, repos = myrepos,  :
  installation of packageC:/Users/m7pr/AppData/Local/Temp/RtmpAtTWgB/file68a811d31ad2/rtables_0.6.11.9002.tar.gzhad non-zero exit status
2: In utils::install.packages(pkgs = pkgs, lib = lib, repos = myrepos,  :
  installation of packageC:/Users/m7pr/AppData/Local/Temp/RtmpAtTWgB/file68a811d31ad2/rtables_0.6.11.9002.tar.gzhad non-zero exit status

Copy link
Contributor

github-actions bot commented Feb 4, 2025


🎉 Thank you for your contribution! Before this PR can be accepted, we require that you read and agree to our Contributor License Agreement.
You can digitally sign the CLA by posting a comment on this Pull Request in the format shown below. This agreement will apply to this PR as well as all future contributions on this repository.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

1 participant