Comments (2)
Thanks for he report, the warning messages about the licensing still need work, they're really at the draft stage, I'll take a look a this issue when refining them.
The problem with copying anyway is that you might end up with much more functions copied.
For instance imagine I want a function from a package based on {rlang} and {tidyselect} magic, if I copy everything I might end up with half of the latter packages copied when I really needed only one function. In other cases I will end up burgling all he recursive dependencies.
An option would be to have an argument to burgle everything but I don't know if it will often be wise, though it wouldn't cost much to implement I guess.
I could also display a message that "this function depends on xxx package but since it's in DESC file, we don't burgle recursively. remove from DESC to change this behavior".
from burglr.
The problem with copying anyway is that you might end up with much more functions copied.
You are right, I didn't think about that.
However, this seems like another problem, as I could have wanted to burgle some {rlang} function without importing {rlang} in the first place.
A possible workaround for this would be to count the functions to add, and if the number is higher than some limit (e.g. 10?), ask if the user really wants to burgle the 347 dependencies of the said function (with burgle(..., warn_limit=10, force=TRUE)
or something similar).
You might even want to display the repartition of the dependencies in the message (50 from {rlang} and 297 from {tidyselect}) so that the user can choose to import some packages or not.
And if you want to really overkill it, you could make an interactive interface, somehow similar to install.packages()
when it asks you to update the dependencies.
(Ok, I'm getting a bit carried away 🤣)
I could also display a message that "this function depends on xxx package but since it's in DESC file, we don't burgle recursively. remove from DESC to change this behavior"
This would be perfect 😄
from burglr.
Related Issues (10)
- namespaces ?
- Feature suggestion: support custom filename for copied functions
- self contained functions
- copying C/C++ stuff HOT 2
- Licencing HOT 15
- Dependency diagram
- Error if a variable is named `x` HOT 1
- if a function is imported already it shouldn't be burgled
- We might need to burgle functions even though we're importing the package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from burglr.