From 865e1dda40d04a59ed2c39182742684e8c857c93 Mon Sep 17 00:00:00 2001 From: infra-bot Date: Tue, 22 Sep 2026 14:08:40 +0200 Subject: [PATCH 1/5] test: fetch_project must find quarto projects without the quarto CLI Fails on the current implementation: with no usable quarto binary a chapter subfolder is not resolved to its project root, and the result is a list instead of a character vector. The equivalence test against quarto inspect already passes and pins the behaviour to keep. --- tests/testthat/test-fetch_project.R | 117 ++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 tests/testthat/test-fetch_project.R diff --git a/tests/testthat/test-fetch_project.R b/tests/testthat/test-fetch_project.R new file mode 100644 index 0000000..3e4bbcd --- /dev/null +++ b/tests/testthat/test-fetch_project.R @@ -0,0 +1,117 @@ +make_project_tree <- function() { + root <- tempfile(pattern = "fetchproj") + dirs <- c( + proj_yml = "proj_yml", + proj_yml_sub = file.path("proj_yml", "chap", "sub"), + proj_yaml = "proj_yaml", + inner = file.path("proj_yml", "inner"), + inner_sub = file.path("proj_yml", "inner", "x"), + no_proj = file.path("no_proj", "deep"), + profile_only = "profile_only", + empty_yml = "empty_yml" + ) + for (a_dir in dirs) { + dir.create(file.path(root, a_dir), recursive = TRUE) + } + project_yaml <- "project:\n type: default" + writeLines(project_yaml, con = file.path(root, "proj_yml", "_quarto.yml")) + writeLines(project_yaml, con = file.path(root, "proj_yaml", "_quarto.yaml")) + writeLines(project_yaml, con = file.path(root, "proj_yml", "inner", "_quarto.yml")) + writeLines(project_yaml, con = file.path(root, "profile_only", "_quarto-init.yml")) + writeLines("", con = file.path(root, "empty_yml", "_quarto.yml")) + + qmd <- file.path(root, dirs, "dummy.qmd") + file.create(qmd) + names(qmd) <- names(dirs) + return(list(root = root, qmd = qmd)) +} + +test_that("fetch_project finds project roots without running quarto", { + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + root <- normalizePath(tree$root, winslash = "/") + + # an unusable quarto binary: only a filesystem lookup can succeed + withr::local_envvar(QUARTO_PATH = file.path(tree$root, "no-quarto")) + + expect_equal( + object = unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yml_sub"])), + expected = file.path(root, "proj_yml") + ) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yaml"])), + expected = file.path(root, "proj_yaml") + ) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = tree$qmd["inner_sub"])), + expected = file.path(root, "proj_yml", "inner") + ) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = tree$qmd["empty_yml"])), + expected = file.path(root, "empty_yml") + ) +}) + +test_that("fetch_project returns the qmd folder when no project is found", { + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + + qmd <- tree$qmd[c("no_proj", "profile_only")] + expect_equal( + object = unlist(fetch_project(vec_qmd_path = qmd)), + expected = unname(dirname(qmd)) + ) +}) + +test_that("fetch_project deduplicates folders and projects", { + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + root <- normalizePath(tree$root, winslash = "/") + + qmd <- tree$qmd[c("proj_yml", "proj_yml_sub", "no_proj")] + qmd <- c(qmd, file.path(dirname(tree$qmd["no_proj"]), "other.qmd")) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = qmd)), + expected = c( + unname(dirname(tree$qmd["no_proj"])), + file.path(root, "proj_yml") + ) + ) +}) + +test_that("fetch_project agrees with quarto inspect", { + skip_if(is.null(quarto::quarto_path()), message = "quarto is not installed") + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + + for (a_qmd in tree$qmd) { + inspected <- tryCatch( + expr = { + quarto::quarto_inspect(dirname(a_qmd))$dir + }, + error = function(e) { + NULL + } + ) + expected <- if (is.null(inspected)) { + dirname(a_qmd) + } else { + normalizePath(inspected, winslash = "/") + } + expect_equal( + object = unlist(fetch_project(vec_qmd_path = a_qmd)), + expected = expected, + label = a_qmd + ) + } +}) + +test_that("fetch_project returns a character vector", { + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + + expect_type( + object = fetch_project(vec_qmd_path = tree$qmd), + type = "character" + ) +}) From fb7c2ad1953aa2ba63e385ee88d4ce09fed77b1a Mon Sep 17 00:00:00 2001 From: infra-bot Date: Tue, 22 Sep 2026 14:08:40 +0200 Subject: [PATCH 2/5] perf: find the quarto project root by walking up the folders fetch_project() ran one quarto inspect process per qmd folder (about 1.5 s each). The root quarto reports is the closest parent holding _quarto.yml or _quarto.yaml, so a filesystem walk gives the same answer: 14.7 s down to 0.01 s on 10 chapter folders. The unused quarto_inspect import is dropped. --- NAMESPACE | 1 - R/add_extension.R | 1 - R/fetch_project.R | 59 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 8342201..1d55731 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -33,7 +33,6 @@ importFrom(purrr,map) importFrom(purrr,map_lgl) importFrom(purrr,walk) importFrom(purrr,walk2) -importFrom(quarto,quarto_inspect) importFrom(quarto,quarto_render) importFrom(quarto,quarto_version) importFrom(rvest,html_attr) diff --git a/R/add_extension.R b/R/add_extension.R index 87b7606..d72b740 100644 --- a/R/add_extension.R +++ b/R/add_extension.R @@ -3,7 +3,6 @@ #' @param vec_qmd_path character. Path to the qmd files targeted for compilation #' @param quiet logical. Warn user of project status. #' -#' @importFrom quarto quarto_inspect #' @importFrom cli cli_alert_info #' @importFrom purrr map map_lgl #' @importFrom fs dir_create diff --git a/R/fetch_project.R b/R/fetch_project.R index bad78ba..0587dcd 100644 --- a/R/fetch_project.R +++ b/R/fetch_project.R @@ -1,12 +1,15 @@ #' List detected quarto project #' +#' A folder belongs to the closest quarto project found by walking up its +#' parents, a project being a folder holding a `_quarto.yml` or +#' `_quarto.yaml`. This is the project root `quarto inspect` reports, found +#' without spawning one quarto process per folder. +#' #' @param vec_qmd_path character. Path to the qmd files targeted for compilation #' @param quiet logical. Warn user of project status. #' -#' @importFrom quarto quarto_inspect -#' @importFrom purrr map map_lgl -#' -#' @return List of quarto projects detected for each qmd. +#' @return character. Quarto project root of each qmd, or the qmd folder +#' when it belongs to no project, without duplicates. #' #' @noRd #' @examples @@ -31,23 +34,41 @@ fetch_project <- function( # _extensions will be added to project root qmd_dir <- unique(dirname(vec_qmd_path)) - quarto_proj <- map( - .x = qmd_dir, - .f = \(x){ - # return NULL if dir is not a quarto project - tryCatch( - expr = { - quarto_inspect(x)$dir - }, - error = \(e){ - NULL - } - ) - } - ) |> as.vector() + quarto_proj <- vapply( + X = qmd_dir, + FUN = find_quarto_project_root, + FUN.VALUE = character(1), + USE.NAMES = FALSE + ) - dir_is_proj <- !map_lgl(quarto_proj, is.null) + dir_is_proj <- !is.na(quarto_proj) qmd_proj_dir <- unique(c(qmd_dir[!dir_is_proj], quarto_proj[dir_is_proj])) return(qmd_proj_dir) } + +#' Find the root of the quarto project holding a folder +#' +#' @param dir character. A folder path. +#' +#' @return character. Normalized path of the closest parent folder (the +#' folder itself included) holding a `_quarto.yml` or `_quarto.yaml`, +#' `NA` when there is none. +#' +#' @noRd +find_quarto_project_root <- function(dir) { + current <- normalizePath(dir, winslash = "/", mustWork = FALSE) + repeat { + config_found <- file.exists( + file.path(current, c("_quarto.yml", "_quarto.yaml")) + ) + if (any(config_found)) { + return(current) + } + parent <- dirname(current) + if (identical(parent, current)) { + return(NA_character_) + } + current <- parent + } +} From e426e9b8a86ad87c2f535311edaca249232fc459 Mon Sep 17 00:00:00 2001 From: infra-bot Date: Tue, 22 Sep 2026 14:08:40 +0200 Subject: [PATCH 3/5] chore: release 1.3.1 --- DESCRIPTION | 3 ++- NEWS.md | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index db22c1b..dfc0d9a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: squash Title: Several Quarto As Single HTML -Version: 1.3.0 +Version: 1.3.1 Authors@R: c( person("Antoine", "Languillaume", , "antoine@thinkr.fr", role = c("aut", "cre")), person("Colin", "Fay", , "colin@thinkr.fr", role = "aut"), @@ -32,6 +32,7 @@ Suggests: pagedown, rmarkdown, testthat, + withr, yesno VignetteBuilder: knitr diff --git a/NEWS.md b/NEWS.md index 92a6a62..6d0ba88 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# squash 1.3.1 + +* Quarto project detection before compilation no longer runs one `quarto inspect` process per qmd folder: the project root is found by walking up the folders to the closest `_quarto.yml` or `_quarto.yaml`, which is the root `quarto inspect` reports. Measured on 10 chapter folders: 14.7 s down to 0.01 s, i.e. about 1.5 s saved per folder on every compilation. + # squash 1.3.0 * Each qmd is now rendered inside an isolated throwaway copy of the quarto project (option `squash.isolate_render`, `TRUE` by default). Concurrent renders no longer share the project state (`.quarto/` crossref index, `_extensions/` resolution), which removes the random `Failed to render` errors of parallel compilation (quarto-dev/quarto-cli#2749). From 8f4f83e439e0008238559717233e5e5e4f2ca22b Mon Sep 17 00:00:00 2001 From: infra-bot Date: Tue, 22 Sep 2026 15:05:52 +0200 Subject: [PATCH 4/5] fix: walk up the path as written, like quarto, without resolving symlinks quarto inspect looks for the project above the folder path it is given: a folder linked into a project belongs to it, a project folder linked from outside does not. Resolving the symlinks first gave the opposite answer in both cases. Relative paths and dot segments are collapsed lexically. The quarto checks of the tests now skip with quarto_available(), which is FALSE for a QUARTO_PATH pointing nowhere. --- NEWS.md | 2 +- R/fetch_project.R | 43 ++++++++++++++-- tests/testthat/test-fetch_project.R | 80 ++++++++++++++++++++++++++++- 3 files changed, 119 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 6d0ba88..6e9a9ef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # squash 1.3.1 -* Quarto project detection before compilation no longer runs one `quarto inspect` process per qmd folder: the project root is found by walking up the folders to the closest `_quarto.yml` or `_quarto.yaml`, which is the root `quarto inspect` reports. Measured on 10 chapter folders: 14.7 s down to 0.01 s, i.e. about 1.5 s saved per folder on every compilation. +* Quarto project detection before compilation no longer runs one `quarto inspect` process per qmd folder: the project root is found by walking up the folders to the closest `_quarto.yml` or `_quarto.yaml`, which is the root `quarto inspect` reports (like quarto, the folders are those of the path as written, symlinks are not resolved). Measured on 10 chapter folders: 14.7 s down to 0.01 s, i.e. about 1.5 s saved per folder on every compilation. # squash 1.3.0 diff --git a/R/fetch_project.R b/R/fetch_project.R index 0587dcd..5067c93 100644 --- a/R/fetch_project.R +++ b/R/fetch_project.R @@ -51,13 +51,14 @@ fetch_project <- function( #' #' @param dir character. A folder path. #' -#' @return character. Normalized path of the closest parent folder (the +#' @return character. Absolute path of the closest parent folder (the #' folder itself included) holding a `_quarto.yml` or `_quarto.yaml`, -#' `NA` when there is none. +#' `NA` when there is none. Like quarto, the parents are those of the +#' path as written: symlinks are not resolved. #' #' @noRd find_quarto_project_root <- function(dir) { - current <- normalizePath(dir, winslash = "/", mustWork = FALSE) + current <- absolute_path(dir) repeat { config_found <- file.exists( file.path(current, c("_quarto.yml", "_quarto.yaml")) @@ -66,9 +67,43 @@ find_quarto_project_root <- function(dir) { return(current) } parent <- dirname(current) - if (identical(parent, current)) { + if (identical(x = parent, y = current)) { return(NA_character_) } current <- parent } } + +#' Make a path absolute without resolving symlinks +#' +#' @param path character. A path, relative to the working directory or +#' absolute. +#' +#' @return character. The absolute path, with `/` separators and the `.` +#' and `..` segments collapsed. +#' +#' @noRd +absolute_path <- function(path) { + path <- gsub(pattern = "\\\\", replacement = "/", x = path) + if (!grepl(pattern = "^([A-Za-z]:)?/", x = path)) { + path <- file.path(gsub(pattern = "\\\\", replacement = "/", x = getwd()), path) + } + root <- regmatches(x = path, m = regexpr(pattern = "^([A-Za-z]:)?/", text = path)) + segments <- strsplit( + x = substring(text = path, first = nchar(root) + 1), + split = "/", + fixed = TRUE + )[[1]] + kept <- character(0) + for (a_segment in segments) { + if (a_segment %in% c("", ".")) { + next + } + if (identical(x = a_segment, y = "..")) { + kept <- kept[-length(kept)] + next + } + kept <- c(kept, a_segment) + } + return(paste0(root, paste(kept, collapse = "/"))) +} diff --git a/tests/testthat/test-fetch_project.R b/tests/testthat/test-fetch_project.R index 3e4bbcd..0201c3e 100644 --- a/tests/testthat/test-fetch_project.R +++ b/tests/testthat/test-fetch_project.R @@ -80,7 +80,7 @@ test_that("fetch_project deduplicates folders and projects", { }) test_that("fetch_project agrees with quarto inspect", { - skip_if(is.null(quarto::quarto_path()), message = "quarto is not installed") + skip_if_not(quarto::quarto_available(), message = "quarto is not installed") tree <- make_project_tree() on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) @@ -115,3 +115,81 @@ test_that("fetch_project returns a character vector", { type = "character" ) }) + +make_symlink_tree <- function() { + root <- normalizePath(tempfile(pattern = "fetchlink"), winslash = "/", mustWork = FALSE) + dir.create(file.path(root, "proj", "chap"), recursive = TRUE) + dir.create(file.path(root, "elsewhere", "chap"), recursive = TRUE) + dir.create(file.path(root, "outside")) + writeLines("project:\n type: default", con = file.path(root, "proj", "_quarto.yml")) + linked <- c( + file.symlink( + from = file.path(root, "proj", "chap"), + to = file.path(root, "outside", "link_in") + ), + file.symlink( + from = file.path(root, "elsewhere", "chap"), + to = file.path(root, "proj", "link_out") + ) + ) + return(list(root = root, linked = all(linked))) +} + +test_that("fetch_project follows the path as written, not the symlink target", { + tree <- make_symlink_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + skip_if_not(tree$linked, message = "symlinks are not supported here") + + # a folder linked from outside a project is not in the project + link_in <- file.path(tree$root, "outside", "link_in") + expect_equal( + object = unlist(fetch_project(vec_qmd_path = file.path(link_in, "a.qmd"))), + expected = link_in + ) + # a folder linked into a project belongs to it + expect_equal( + object = unlist(fetch_project( + vec_qmd_path = file.path(tree$root, "proj", "link_out", "a.qmd") + )), + expected = file.path(tree$root, "proj") + ) +}) + +test_that("fetch_project agrees with quarto inspect through symlinks", { + skip_if_not(quarto::quarto_available(), message = "quarto is not installed") + tree <- make_symlink_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + skip_if_not(tree$linked, message = "symlinks are not supported here") + + for (a_dir in file.path(tree$root, c("outside/link_in", "proj/link_out"))) { + inspected <- tryCatch( + expr = { + quarto::quarto_inspect(a_dir)$dir + }, + error = function(e) { + a_dir + } + ) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = file.path(a_dir, "a.qmd"))), + expected = inspected, + label = a_dir + ) + } +}) + +test_that("fetch_project resolves relative paths and dot segments", { + tree <- make_project_tree() + on.exit(unlink(tree$root, recursive = TRUE), add = TRUE) + root <- normalizePath(tree$root, winslash = "/") + + withr::local_dir(file.path(root, "proj_yml", "chap")) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = file.path("sub", "..", "sub", ".", "dummy.qmd"))), + expected = file.path(root, "proj_yml") + ) + expect_equal( + object = unlist(fetch_project(vec_qmd_path = file.path("..", "..", "no_proj", "deep", "dummy.qmd"))), + expected = file.path("..", "..", "no_proj", "deep") + ) +}) From 939330ab6514d2a7ab115b6379e4a1dca422acc0 Mon Sep 17 00:00:00 2001 From: infra-bot Date: Fri, 25 Sep 2026 18:45:33 +0200 Subject: [PATCH 5/5] test: compare the folder designated, not the way its path is written quarto and fetch_project() both keep the path as written. The tests normalised only the expected side, so they failed on macOS, where the temporary folder lives under /var, a link to /private/var, and on Windows, where a temporary path carries short names and backslashes. Both sides are now compared in the same canonical form, which still catches an implementation resolving the links before walking up: 4 failures. --- tests/testthat/test-fetch_project.R | 61 ++++++++++++++++------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/tests/testthat/test-fetch_project.R b/tests/testthat/test-fetch_project.R index 0201c3e..237af99 100644 --- a/tests/testthat/test-fetch_project.R +++ b/tests/testthat/test-fetch_project.R @@ -1,3 +1,10 @@ +# quarto renvoie le chemin tel qu il est ecrit : les comparaisons portent sur +# le dossier designe, pas sur sa forme (/var contre /private/var sur macOS, +# noms courts et antislashs sur Windows) +same_dir <- function(paths) { + return(normalizePath(paths, winslash = "/", mustWork = FALSE)) +} + make_project_tree <- function() { root <- tempfile(pattern = "fetchproj") dirs <- c( @@ -35,20 +42,20 @@ test_that("fetch_project finds project roots without running quarto", { withr::local_envvar(QUARTO_PATH = file.path(tree$root, "no-quarto")) expect_equal( - object = unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yml_sub"])), - expected = file.path(root, "proj_yml") + object = same_dir(unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yml_sub"]))), + expected = same_dir(file.path(root, "proj_yml")) ) expect_equal( - object = unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yaml"])), - expected = file.path(root, "proj_yaml") + object = same_dir(unlist(fetch_project(vec_qmd_path = tree$qmd["proj_yaml"]))), + expected = same_dir(file.path(root, "proj_yaml")) ) expect_equal( - object = unlist(fetch_project(vec_qmd_path = tree$qmd["inner_sub"])), - expected = file.path(root, "proj_yml", "inner") + object = same_dir(unlist(fetch_project(vec_qmd_path = tree$qmd["inner_sub"]))), + expected = same_dir(file.path(root, "proj_yml", "inner")) ) expect_equal( - object = unlist(fetch_project(vec_qmd_path = tree$qmd["empty_yml"])), - expected = file.path(root, "empty_yml") + object = same_dir(unlist(fetch_project(vec_qmd_path = tree$qmd["empty_yml"]))), + expected = same_dir(file.path(root, "empty_yml")) ) }) @@ -58,8 +65,8 @@ test_that("fetch_project returns the qmd folder when no project is found", { qmd <- tree$qmd[c("no_proj", "profile_only")] expect_equal( - object = unlist(fetch_project(vec_qmd_path = qmd)), - expected = unname(dirname(qmd)) + object = same_dir(unlist(fetch_project(vec_qmd_path = qmd))), + expected = same_dir(unname(dirname(qmd))) ) }) @@ -71,11 +78,11 @@ test_that("fetch_project deduplicates folders and projects", { qmd <- tree$qmd[c("proj_yml", "proj_yml_sub", "no_proj")] qmd <- c(qmd, file.path(dirname(tree$qmd["no_proj"]), "other.qmd")) expect_equal( - object = unlist(fetch_project(vec_qmd_path = qmd)), - expected = c( + object = same_dir(unlist(fetch_project(vec_qmd_path = qmd))), + expected = same_dir(c( unname(dirname(tree$qmd["no_proj"])), file.path(root, "proj_yml") - ) + )) ) }) @@ -96,11 +103,11 @@ test_that("fetch_project agrees with quarto inspect", { expected <- if (is.null(inspected)) { dirname(a_qmd) } else { - normalizePath(inspected, winslash = "/") + inspected } expect_equal( - object = unlist(fetch_project(vec_qmd_path = a_qmd)), - expected = expected, + object = same_dir(unlist(fetch_project(vec_qmd_path = a_qmd))), + expected = same_dir(expected), label = a_qmd ) } @@ -143,15 +150,15 @@ test_that("fetch_project follows the path as written, not the symlink target", { # a folder linked from outside a project is not in the project link_in <- file.path(tree$root, "outside", "link_in") expect_equal( - object = unlist(fetch_project(vec_qmd_path = file.path(link_in, "a.qmd"))), - expected = link_in + object = same_dir(unlist(fetch_project(vec_qmd_path = file.path(link_in, "a.qmd")))), + expected = same_dir(link_in) ) # a folder linked into a project belongs to it expect_equal( - object = unlist(fetch_project( + object = same_dir(unlist(fetch_project( vec_qmd_path = file.path(tree$root, "proj", "link_out", "a.qmd") - )), - expected = file.path(tree$root, "proj") + ))), + expected = same_dir(file.path(tree$root, "proj")) ) }) @@ -171,8 +178,8 @@ test_that("fetch_project agrees with quarto inspect through symlinks", { } ) expect_equal( - object = unlist(fetch_project(vec_qmd_path = file.path(a_dir, "a.qmd"))), - expected = inspected, + object = same_dir(unlist(fetch_project(vec_qmd_path = file.path(a_dir, "a.qmd")))), + expected = same_dir(inspected), label = a_dir ) } @@ -185,11 +192,11 @@ test_that("fetch_project resolves relative paths and dot segments", { withr::local_dir(file.path(root, "proj_yml", "chap")) expect_equal( - object = unlist(fetch_project(vec_qmd_path = file.path("sub", "..", "sub", ".", "dummy.qmd"))), - expected = file.path(root, "proj_yml") + object = same_dir(unlist(fetch_project(vec_qmd_path = file.path("sub", "..", "sub", ".", "dummy.qmd")))), + expected = same_dir(file.path(root, "proj_yml")) ) expect_equal( - object = unlist(fetch_project(vec_qmd_path = file.path("..", "..", "no_proj", "deep", "dummy.qmd"))), - expected = file.path("..", "..", "no_proj", "deep") + object = same_dir(unlist(fetch_project(vec_qmd_path = file.path("..", "..", "no_proj", "deep", "dummy.qmd")))), + expected = same_dir(file.path("..", "..", "no_proj", "deep")) ) })