Skip to content

setting INSTALL_opts #514

Open
Open

Description

@kkmann

Dear all,

is there a way of setting INSTALL_opts with pkg_install() - I would like to install tests with "--install-tests" but there seems to be no way of passing that through pkg_install().

Activity

  1. gaborcsardi commented on Jun 23, 2023

    @gaborcsardi
    Member

    There isn't currently. Why do you want to install the tests?

  2. kkmann commented on Jun 23, 2023

    @kkmann
    Author

    I was hoping to run them after installation as basic integration tests. renv allows this this via options(), see https://stackoverflow.com/questions/68890715/install-r-package-with-specific-version-and-tests but I would love to use the automagic sys deps installation and parallel features of pak. Tagging @michaelmayer2.

    edit: seems that you just set INSTALL_opts = "", how about exposing that via an INSTALL_opts global option?

    install_one <- function(pkg, lib = .libPaths()[1], INSTALL_opts = "", ...) {

  3. gaborcsardi commented on Jun 23, 2023

    @gaborcsardi
    Member

    I was hoping to run them after installation as basic integration tests.

    That means that you cannot install these packages from binaries, though. Is that OK?

    What are you going to do if a test fails? Sporadic test failures do happen.

    how about exposing that via an INSTALL_opts global option?

    That is not the line/file that pak uses for installation, it is rather here:
    https://github.com/r-lib/pkgdepends/blob/6741f04bf5f7fc8d73d87b3a326b1bf5a3914a38/R/install-plan.R#L393-L397

    But in any case, we can add support for this.

  4. added
    feature
    on Jun 23, 2023
  5. kkmann commented on Jun 23, 2023

    @kkmann
    Author

    I was hoping to run them after installation as basic integration tests.

    That means that you cannot install these packages from binaries, though. Is that OK?

    Absolutely - we consider using an internal offline package manager snapshot (only sources), that's why the parallel installation feature of pak is so great :)

    What are you going to do if a test fails? Sporadic test failures do happen.

    Despair and run some kind of mitigation strategy or at least document a test failure. Sometimes restarting might help even if it is not Windows. If tests consistently fail, keep a record of those, assess them, and then diff against this log of 'safe fails'.

    how about exposing that via an INSTALL_opts global option?

    That is not the line/file that pak uses for installation, it is rather here: https://github.com/r-lib/pkgdepends/blob/6741f04bf5f7fc8d73d87b3a326b1bf5a3914a38/R/install-plan.R#L393-L397

    But in any case, we can add support for this.

    Great, thx 🚀.

  6. kkmann commented on Nov 16, 2024

    @kkmann
    Author

    I opened a issue in {pkgdepends} since this seems the better place to discuss it.

    r-lib/pkgdepends#394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions