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

actions check error when installing dependency whose repo name != package name #521

Closed
jefferis opened this issue Jul 5, 2023 · 3 comments

Comments

@jefferis
Copy link

jefferis commented Jul 5, 2023

@gaborcsardi as discussed. Thanks so much for any input you can give.

tl;dr

Where in a package being checked with GitHub actions can I hint to pak about a dependency whose repo name != package name? So far, my best guess leaves a check error It looks like this package has a loading problem when not on .libPaths:.

The details:

I am trying to use github actions with a package (natverse/malevc). It depends (suggests) a package natverse/fafbseg which in turn depends (imports) a package catmaid=natverse/rcatmaid. For this last case the package name (catmaid) is not the same as the repo name (rcatmaid). This is not something I can change.

I know that I can do

pak::pkg_install('catmaid=natverse/rcatmaid')

But I do not know where I can hint to pak running through github actions that the package catmaid can be found at natverse/rcatmaid. The DESCRIPTION of the second package (fafbseg) has

Remotes: 
    ...
    natverse/rcatmaid,
    ...

But this is not enough for pak (although it is sufficient for remotes) and I get a dependency resolution error. I have tried specifying the difficult dependency (catmaid) in the workflow file like this:

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck, catmaid=natverse/rcatmaid
          needs: check

This installs fine, but then I get a check error:

* checking loading without being on the library search path ... WARNING
Error: Error in loadNamespace(x) : there is no package called ‘fafbseg’

It looks like this package has a loading problem when not on .libPaths:
see the messages for details.
@jefferis jefferis changed the title Unable to install dependency whose repo name != package name actions check error when installing dependency whose repo name != package name Jul 5, 2023
@jefferis
Copy link
Author

jefferis commented Jul 5, 2023

OK my conclusion is that this was the right thing to do:

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck, catmaid=natverse/rcatmaid
          needs: check

and the additional failure was an unrelated issue.

@jefferis
Copy link
Author

jefferis commented Jul 5, 2023

closing with apologies for noise.

@jefferis jefferis closed this as completed Jul 5, 2023
@gaborcsardi
Copy link
Member

gaborcsardi commented Jul 5, 2023

No worries. Happy that it works now.

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

No branches or pull requests

2 participants