Skip to content

Remove generate_dsym argument #2600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# devtools (development version)

* On macOS, `install()` now generates `dSYM` sidecar files for native libraries by default.

* Functions that use httr now explicitly check that it is installed
(@catalamarti, #2573).

Expand Down
30 changes: 7 additions & 23 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
#' binary artefacts (like \file{.o}, `.so`) from appearing in your local
#' package directory, but is considerably slower, because every compile has
#' to start from scratch.
#'
#' One downside of installing from a built tarball is that the package is
#' installed from a temporary location. This means that any source references,
#' at R level or C/C++ level, will point to dangling locations. The debuggers
#' will not be able to find the sources for step-debugging. If you're
#' installing the package for development, consider setting `build` to
#' `FALSE`.
#' @param args An optional character vector of additional command line
#' arguments to be passed to `R CMD INSTALL`. This defaults to the
#' value of the option `"devtools.install.args"`.
Expand All @@ -36,27 +43,6 @@
#' @param keep_source If `TRUE` will keep the srcrefs from an installed
#' package. This is useful for debugging (especially inside of RStudio).
#' It defaults to the option `"keep.source.pkgs"`.
#' @param generate_dsym (macOS only) If `TRUE`, and if the package includes a
#' native library (a `.so` file), a `dSYM` sidecar file is generated and
#' installed alongside the library. This file contains source and line
#' information that allows a debugger to step through original sources.
#'
#' Note that when `build` is set to `TRUE`, `install()` operates from a
#' temporary directory which causes the source paths to point to dangling
#' locations. You will need to remap these paths to the actual sources on your
#' disk, e.g. with lldb:
#'
#' ```
#' # Get information about the dangling temporary path for a function in your
#' # library
#' image lookup -vn my_function
#'
#' # Remap the dangling location to the actual package path
#' settings set target.source-map /private/tmp/Rtmpnl5XgE/R.INSTALLe5133dcc3211/mypackage /path/to/mypackage
#' ```
#'
#' To avoid this, set `build` to `FALSE` to install directly from the source
#' location instead of a "built" package tarball.
#' @param ... additional arguments passed to [remotes::install_deps()]
#' when installing dependencies.
#' @family package installation
Expand All @@ -71,7 +57,6 @@ install <-
build_vignettes = FALSE,
keep_source = getOption("keep.source.pkgs"),
force = FALSE,
generate_dsym = TRUE,
...) {
pkg <- as.package(pkg)

Expand All @@ -92,7 +77,6 @@ install <-

opts <- c(
if (keep_source) "--with-keep.source",
if (is_macos && generate_dsym) "--dsym",
"--install-tests"
)
if (quick) {
Expand Down
31 changes: 8 additions & 23 deletions man/install.Rd

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

9 changes: 8 additions & 1 deletion man/install_deps.Rd

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