diff --git a/R/use_extendr.R b/R/use_extendr.R index e0694db3..de14cb44 100644 --- a/R/use_extendr.R +++ b/R/use_extendr.R @@ -137,7 +137,8 @@ use_extendr <- function(path = ".", cargo_toml_content <- to_toml( package = list(name = crate_name, publish = FALSE, version = "0.1.0", edition = edition), lib = list(`crate-type` = array("staticlib", 1), name = lib_name), - dependencies = list(`extendr-api` = "*") + dependencies = list(`extendr-api` = list(git = "https://github.com/extendr/extendr")) + # dependencies = list(`extendr-api` = "*") ) use_rextendr_template( diff --git a/R/zzz.R b/R/zzz.R index 4a1e7098..355e5459 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -25,7 +25,8 @@ # Version of 'extendr_api' to be used rextendr.extendr_deps = list( - `extendr-api` = "*" + # `extendr-api` = "*" + `extendr-api` = list(git = "https://github.com/extendr/extendr") ), rextendr.extendr_dev_deps = list( `extendr-api` = list(git = "https://github.com/extendr/extendr") diff --git a/tests/testthat/_snaps/use_cran_defaults.md b/tests/testthat/_snaps/use_cran_defaults.md index 6a19be7a..9f005ac7 100644 --- a/tests/testthat/_snaps/use_cran_defaults.md +++ b/tests/testthat/_snaps/use_cran_defaults.md @@ -12,7 +12,7 @@ v Writing 'src/Makevars.win' v Writing 'src/Makevars.ucrt' v Writing 'src/.gitignore' - v Adding "^src/\\.cargo$" to '.Rbuildignore'. + v Adding '^src/\\.cargo$' to '.Rbuildignore' v Writing 'src/rust/Cargo.toml' v Writing 'src/rust/src/lib.rs' v Writing 'src/testpkg-win.def' @@ -29,8 +29,8 @@ v Writing 'configure.win' > File 'src/Makevars' already exists. Skip writing the file. > File 'src/Makevars.win' already exists. Skip writing the file. - v Adding "^src/rust/vendor$" to '.Rbuildignore'. - v Adding "src/rust/vendor" to '.gitignore'. + v Adding '^src/rust/vendor$' to '.Rbuildignore' + v Adding 'src/rust/vendor' to '.gitignore' --- @@ -175,6 +175,10 @@ [source.crates-io] replace-with = "vendored-sources" + [source."git+https://github.com/extendr/extendr"] + git = "https://github.com/extendr/extendr" + replace-with = "vendored-sources" + [source.vendored-sources] directory = "vendor" diff --git a/tests/testthat/_snaps/use_extendr.md b/tests/testthat/_snaps/use_extendr.md index 5e2349e5..bb074715 100644 --- a/tests/testthat/_snaps/use_extendr.md +++ b/tests/testthat/_snaps/use_extendr.md @@ -12,7 +12,7 @@ v Writing 'src/Makevars.win' v Writing 'src/Makevars.ucrt' v Writing 'src/.gitignore' - v Adding "^src/\\.cargo$" to '.Rbuildignore'. + v Adding '^src/\\.cargo$' to '.Rbuildignore' v Writing 'src/rust/Cargo.toml' v Writing 'src/rust/src/lib.rs' v Writing 'src/testpkg-win.def' @@ -169,7 +169,7 @@ name = 'testpkg' [dependencies] - extendr-api = '*' + extendr-api = { git = 'https://github.com/extendr/extendr' } --- @@ -248,7 +248,7 @@ name = 'bar' [dependencies] - extendr-api = '*' + extendr-api = { git = 'https://github.com/extendr/extendr' } # use_rextendr_template() can overwrite existing files diff --git a/tests/testthat/test-optional-features.R b/tests/testthat/test-optional-features.R index 797ff324..d67a30ca 100644 --- a/tests/testthat/test-optional-features.R +++ b/tests/testthat/test-optional-features.R @@ -23,7 +23,7 @@ test_that("Feature 'ndarray' is enabled when 'extendr-api' has features enabled" rust_source( file = input, features = "ndarray", - extendr_deps = list(`extendr-api` = list(version = "*", features = array("serde"))) + extendr_deps = list(`extendr-api` = list(git = "https://github.com/extendr/extendr", features = array("serde"))) ) data <- matrix(runif(100L), 25)