Closed mmuurr closed 3 years ago
I walked back through commits and found the this is the commit that broke the module functionality (01c27bf3c7ffda2f3e81656fe5d4ca1d5e109d34), if that helps track down the issue.
@smbache I cloned the repo and then noticed you already have a branch that addresses this issue. I installed that branch and it seems to solve the problem ... should that be merged into master with a version bump for R package managers to detect?
Cheers!
Just a quick heads up. I've merged the fix-import-here-environment
branch into the work I am doing, since I came across similar issues as well and found that it solved it. So once my pull request (https://github.com/smbache/import/pull/26) gets incorporated, that fix should get into the master branch.
Thanks! That's great
It feels to me that this issue (import::here()
not working correctly) has now been fixed on master. Testing the most recent version would be appreciated:
remotes::install_github("smbache/import")
Any remaining issues are probably caused by the recursive use of import (using import::from() in a module, that is then itself imported using import::from()). That issue can be fixed by using import::here()
in the module file insted of import::from()
(as @mmuurr was trying to do).
Any further discussions about the recursive import issue should probably be directed to #13 for now.
Fixed in release 1.2.0
In the "modules" section of the documentation, the behavior doesn't match the description. I explicitly copied the
some_module.R
example (and swapped out thelibrary(ggplot2)
line with the suggestedimport::here(qplot, .from = ggplot2)
line, then tried toimport::from
that module like so:I'm using the most recent commit on the master branch (8ad48cc7e54bab65f2fcb816349dd221a73a1f20).