On 2025-09-04 7:03 a.m., Hüsing, Johannes via R-package-devel wrote:
usethis::proj_set(getwd())
✔ Setting active project to 
"//some-project/UserHome$/jhuesing/R/Tools/ICD_O_3/ICDO3".
### hmm ...
getwd()
[1] "u:/R/Tools/ICD_O_3/ICDO3"
### double hmm ...

The conversion seems to happen within functions of he usethis package, some of 
which are used by proj_set() but not exported, such as proj_find()

It seems like you may be the only one able to narrow this down further. Here's what you could do:

  debug(usethis::proj_set)
  usethis::proj_set(getwd())

This will single-step through proj_set. If you are in RStudio or a similar environment, it will display the values of local variables. You will probably be able to see the string "//some-project/UserHome$/jhuesing/R/Tools/ICD_O_3/ICDO3" show up in one of those at some point. (I'd guess it will happen really soon, after the call to proj_path_prep(path). If you don't see local variables displayed, then you can run

  <something>

to print the current value of that variable, or print(<something>) if the variable name matches a browser command.

It's likely that you'll be able to identify the exact function call that produces the UNC path. Then you can try to see if that same function call does the same thing at top level. You can call unexported functions using the triple colon notation, e.g. usethis:::proj_path_prep(). Then you can repeat:

  debug(usethis:::proj_path_prep)

or use the browser "s" command to step into that call. Use undebug() to remove the debugging flags from functions after you find out they aren't interesting.

Duncan Murdoch

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to