Closed gaborcsardi closed 8 years ago
Or we should just make sure that all imports and dependencies are available?
Or, we do not actually try to run the code, at least not code that is not a function definition. Maybe this is the best solution.
So, we need some smart reader, that parses the code into a list of expressions, and then analyze that. No need to run it at all, actually. We just need to be able to parse it syntactically.
We only need to run it, if some references are not resolved with the static analysis, and we need to load the package and its imports and search for the unresolved references.
Close this for now, will implement the parsing of non-function-definition code later.
E.g. code that uses R6 classes typically contains an
R6Class
call, outside of any functions. This cannot be run, because it needs theR6
package.Should we just treat R6 specially?