From f8c0945ad763bedce237209d121f5b0f22318981 Mon Sep 17 00:00:00 2001 From: tylermorganwall <297609+tylermorganwall@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:39:06 -0500 Subject: [PATCH 1/2] Replace single quotes with escaped double quotes This fixes the behavior on Windows, which does not always recognize single quotes. This can lead to clangd failing to compile the database correctly. --- R/compilation-db.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/compilation-db.R b/R/compilation-db.R index 93712e5..477d0bb 100644 --- a/R/compilation-db.R +++ b/R/compilation-db.R @@ -268,5 +268,5 @@ linking_to_flags <- function(desc) { paths <- vapply(linking_to, function(pkg) system.file("include", package = pkg), "") paths <- paths[paths != ""] - paste(paste0("-I'", paths, "'"), collapse = " ") + paste(paste0("-I\"", paths, "\""), collapse = " ") } From 38dedfa0da641d3586415c3d6fc379161926d523 Mon Sep 17 00:00:00 2001 From: tylermorganwall <297609+tylermorganwall@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:35:35 -0500 Subject: [PATCH 2/2] Update NEWS.md --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index b14601e..fac315f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,7 +7,8 @@ * The generator of `compile_commands.json` is now more reliable in the presence of extra whitespace in `make`'s output (#288, @TimTaylor). - +* The generator of `compile_commands.json` now uses escaped double quotes for LinkingTo packages to ensure valid argument strings when parsed on Windows (#305, @tylermorganwall). + # pkgload 1.4.0 * The `reset` argment of `load_all()` is no longer supported because preserving