Skip to content

Commit

Permalink
Merge pull request #17 from mrc-ide/use-conan-v2
Browse files Browse the repository at this point in the history
Use conan v2
  • Loading branch information
weshinsley authored Dec 12, 2023
2 parents 42895be + 7726afd commit b1e671c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Imports:
rprojroot,
withr
Suggests:
conan,
conan2,
mockery,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Remotes:
mrc-ide/conan@main-v2
mrc-ide/conan2@main
2 changes: 1 addition & 1 deletion R/configure.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ hermod_configure <- function(driver, ..., root = NULL) {
##'
##' @param provision Provision a library. Works with conan, and must
##' accept `method`, `config`, `path_root` followed by `...` to pass
##' through to `conan::conan_configure`. It is expected this
##' through to `conan2::conan_configure`. It is expected this
##' function will trigger running conan to provision a library.
##'
##' @export
Expand Down
4 changes: 2 additions & 2 deletions drivers/windows/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ URL: https://github.com/mrc-ide/hermod.windows
BugReports: https://github.com/mrc-ide/hermod.windows/issues
Imports:
cli,
conan (>= 1.9.0),
conan2,
crayon,
fs,
glue,
Expand All @@ -34,4 +34,4 @@ Suggests:
withr
Config/testthat/edition: 3
Remotes:
mrc-ide/conan@main-v2
mrc-ide/conan2@main
6 changes: 3 additions & 3 deletions drivers/windows/R/provision.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## windows-specific provisioning code, called from hermod
windows_provision <- function(method, config, path_root, environment, ...) {
conan_config <- conan::conan_configure(
conan_config <- conan2::conan_configure(
method,
path = path_root,
path_lib = config$path_lib,
Expand All @@ -10,7 +10,7 @@ windows_provision <- function(method, config, path_root, environment, ...) {

id <- ids::random_id()
path <- file.path(path_root, "hermod", "provision", id, "conan.R")
conan::conan_write(conan_config, path)
conan2::conan_write(conan_config, path)

path_batch <- write_batch_provision_script(id, config, path_root)

Expand All @@ -35,7 +35,7 @@ windows_provision <- function(method, config, path_root, environment, ...) {
"failure") # "ERROR", "CANCELLED" or unknown status
}

conan::conan_watch(
conan2::conan_watch(
status,
function() readlines_if_exists(path_log, warn = FALSE),
show_log = conan_config$show_log,
Expand Down
2 changes: 1 addition & 1 deletion man/hermod_driver.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/helper-hermod.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ elsewhere_result <- function(id, config, path_root) {


elsewhere_provision <- function(method, config, path_root, environment, ...) {
conan_config <- conan::conan_configure(
conan_config <- conan2::conan_configure(
method,
path = path_root,
path_lib = file.path("hermod", "lib"),
Expand All @@ -74,7 +74,7 @@ elsewhere_provision <- function(method, config, path_root, environment, ...) {
file.copy(file.path(path_root, conan_config$script),
file.path(path_there, conan_config$script),
overwrite = TRUE))
withr::with_dir(path_there, conan::conan_run(conan_config))
withr::with_dir(path_there, conan2::conan_run(conan_config))
}


Expand Down

0 comments on commit b1e671c

Please sign in to comment.