You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I think renv now parses box::use() statements. But we might still prefer a solution with dependencies explicitly listed in a single file in project root. That's how some other major languages approach it (e.g. Python, JavaScript on Node.js) - probably because it makes sense to have this important information in a single place, and because scanning the whole repository each time this information is needed can be prohibitively slow. Anyway, it would be good to revisit our approach with dependencies.R - perhaps a better solution is possible today?
If we were to stick to dependencies.R, I think a linter to check for alphabetical order could be nice, but I do see one potential problem: users might choose to use comments and group packages in some meaningful way; alphabetical sorting would break it. I'm not sure if anybody does that though.
Comments won't be a problem with lintr. But, grouping packages in some meaningful way does make sense (if anyone does that) and will be seen as lint if we choose to enforce alphabetically sorted library calls.
radbasa
changed the title
Renv dependecies.R file linter
Renv dependencies.R file linter
Feb 7, 2024
Because
renv
does not see packages declared inbox::use()
, we use adependencies.R
file forrenv
to parse.Does it make sense to check if the packages are sorted alphabetically in
dependencies.R
?Will an alphabetical order cause issues?
The text was updated successfully, but these errors were encountered: