[R-pkg-devel] Help with a github/Rstudio mess

Georgi Boshnakov georg|@bo@hn@kov @end|ng |rom m@nche@ter@@c@uk
Wed Jul 5 13:14:21 CEST 2023


If I understand correctly, the errors come from github actions run on github. I think that you should update them first, since github switched to new versions in the meantime.

Georgi Boshnakov

Sent from Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: R-package-devel <r-package-devel-bounces using r-project.org> on behalf of Duncan Murdoch <murdoch.duncan using gmail.com>
Sent: Wednesday, July 5, 2023 10:03:11 AM
To: chrishold using psyctc.org <chrishold using psyctc.org>; r-package-devel using r-project.org <r-package-devel using r-project.org>
Subject: Re: [R-pkg-devel] Help with a github/Rstudio mess

I think this isn't the right place to ask for this sort of help. Maybe
stackoverflow instead?

What I'd do in this case is to rename the local dir holding the
repository, then clone a new copy from Github.  Assuming that works,
compare all the files to make sure that you have all recent changes,
commit any that were missed, then throw away the damaged one.

Duncan Murdoch

On 05/07/2023 4:44 a.m., Chris Evans wrote:
> I hope this is a legitimate question here.  I have a package of very
> simple functions: https://urldefense.com/v3/__https://github.com/cpsyctc/CECPfuns__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCCSSxRo1w$ [github[.]com].  For the forseeable
> future it's really only to stop me constantly having to rewrite
> functions I use and it is only also used by probably two or three
> colleagues who
> also use R and are even less IT/programming/R competent than I am and
> are very happy to use my functions.
>
> I hadn't done any work on it for two years but came back to it yesterday
> and added a function (getCIforQuantiles).  There were warnings about
> things that are deprecated now in some of the older functions but
> otherwise things seemed OK.  However, I got a pkgdown error and warning
> after
> pushing the updated package to github:
>
> Annotations
> 1 error and 1 warning
> pkgdown
> Failed to get R 4.3.1: Failed to get R 4.3.1: Failed to download version
> 4.3.1: Error: Unexpected HTTP response: 404
> r-lib/actions/setup-r using v1 is deprecated.
> r-lib/actions/setup-r using v1 is deprecated. Please update your workflow to
> use the 'v2' version. Also look at the examples at
> https://urldefense.com/v3/__https://github.com/r-lib/actions/tree/v2/examples__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCD0u-NayA$ [github[.]com] because '@v2'
> workflows are much simpler than 'v1' workflows.
>
> So I tweaked
> https://urldefense.com/v3/__https://github.com/cpsyctc/CECPfuns/blob/main/.github/workflows/pkgdown.yaml__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCCnQO2uOA$ [github[.]com]
> to change
>      - uses: r-lib/actions/setup-r using v1
> to
>      - uses: r-lib/actions/setup-r using v2
> rather optimistically hoping that might make the warning go away.
>
> Today I did some work on the new function (trivial, correcting one
> "!is.na(" to the correct "is.na(" !!!).  More importantly, I created the
> test-getCIforQuantiles.R file for testthat to test the sanity checks and
> add three simple output checks.
>
> I built the source package locally, committed the changes and tried to
> push the update to github (inside Rstudio) but I get:
>
>   >>> /usr/bin/git push origin HEAD:refs/heads/main
> To https://urldefense.com/v3/__https://github.com/cpsyctc/CECPfuns.git__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCCMv5veZQ$ [github[.]com]
>    ! [rejected]        HEAD -> main (fetch first)
> error: failed to push some refs to 'https://urldefense.com/v3/__https://github.com/cpsyctc/CECPfuns.git__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCCMv5veZQ$ [github[.]com]'
> hint: Updates were rejected because the remote contains work that you do
> hint: not have locally. This is usually caused by another repository pushing
> hint: to the same ref. You may want to first integrate the remote changes
> hint: (e.g., 'git pull ...') before pushing again.
> hint: See the 'Note about fast-forwards' in 'git push --help' for details.
>
> OK.  So I try to pull thinking that made sense and that the change to
> pkgdown.yaml on github that I made yesterday is the offending change.
>
> However, when I pull (in Rstudio again) I get this:
>
>   >>> /usr/bin/git pull
> fatal: pack has 6 unresolved deltas
> fatal: fetch-pack: invalid index-pack output
>
> I have never felt on top of the complexities of git and github but I'm
> clearly way out of my depth.  I am hoping someone here can see what
> I need to do to get things back in synch and be able to get back to
> developing the package.
>

______________________________________________
R-package-devel using r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!PDiH4ENfjr2_Jw!FZGzBDcbpIrmi_GwRh-AOLdv_s3ZxBSRedrQOny_05Q7aFCZq6Qz2deRH-xf1t-f2t_aYV98T4tnvzDCQlxqxh28IYKhYCCPKVmhQw$ [stat[.]ethz[.]ch]

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list