dokato / todor

TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.
Other
246 stars 12 forks source link

New install Does not work....not sure what is causing issues #14

Closed Guceri closed 6 years ago

Guceri commented 6 years ago

I am running v 3.5 so maybe that is the first place to start. When I try to install from cran, I get the following message: package ‘todor’ is not available (for R version 3.5.1)

So I tried the devtools install directory from github. That seemed to work. Now if I click on add-ins, I can see the two options in the drop down "Find package TODOs" and also "Find project TODOs".

When I click on "Find project TODOs" I get a pop up window that says" R code execution error" and then a message in the console that reads:

Error in dir(path = search_path, pattern = rex::rex(".", one_of("Rr"), : invalid 'path' argument

So other random settings that may or may not be useful to know: -I run Rstudio as admin -I have a default wd() that is set to a subfolder on my c drive within the R 3.5 folder

Any help would be much appreciated.

dokato commented 6 years ago

Hi @Guceri , thanks for your detailed bug report.

Regarding your first problem, todor is not yet available at CRAN, so only devtools installation works for now. CRAN version is at my todo list, but it requires some commitment to make it ready.

Your second issue with "Find project TODOs" is an obvious bug. Thanks again for spotting it. Currently, it searches over project files and since probably you're not within the project you get this error. The reason why I didn't want to start searching in the working directory is that todor performs an exhaustive search, so it would be really time-consuming to find all R files on your computer if you're in a very top folder. But yeah... I definitely need to fix it.

As a workaround, you might call todor_file function in RStudio command-line on your files.

todor::todor_file("path/to/your/file.R")

Hope it helps :)

dokato commented 6 years ago

@Guceri I fixed the error you described by throwing a more informative error message that you're not in the project. I think this is more expected behaviour. If not, let me know what you think would be more intuitive from a users perspective.