cpp11::cpp_source() by default uses a temp directory to store the source files to compile. When an error occurs, however, the errors are also reported with a temp path like the following:
>cpp11::cpp_source("indention.cpp") /tmp/RtmptYYXie/file3b9a74895bd2a/src/indention.cpp:6:47:error: ‘x’ wasnotdeclaredinthisscope6|SEXP detect_comments(SEXPcontent, SEXProw=x)
|^make:*** [/usr/lib/R/etc/Makeconf:177:/tmp/RtmptYYXie/file3b9a74895bd2a/src/indention.o] Error1make:***Waitingforunfinishedjobs....Error:Compilationfailed.Backtrace:1: stop("Compilation failed.", call.=FALSE)
2:cpp11::cpp_source("indention.cpp")where these files are immediately removed. If a code editor (e.g. VS Code) supports detecting file links in the terminal output, user could not jump to the line and column from these paths as they don't exist anymore.
I guess it might make more sense to show the original file paths in the error output.
cpp11::cpp_source()by default uses a temp directory to store the source files to compile. When an error occurs, however, the errors are also reported with a temp path like the following:where these files are immediately removed. If a code editor (e.g. VS Code) supports detecting file links in the terminal output, user could not jump to the line and column from these paths as they don't exist anymore.
I guess it might make more sense to show the original file paths in the error output.