Coder Social home page Coder Social logo

Comments (2)

moodymudskipper avatar moodymudskipper commented on September 28, 2024

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.

DanChaltiel avatar DanChaltiel commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.