Giter Club home page Giter Club logo

Comments (3)

klutometis avatar klutometis commented on June 1, 2024

I brought this up via email: but, is Depends or Suggests, &c. more appropriate? Seems like we might need a mechanism for specifying this, unless e.g. Depends is implicit in @imports.

from roxygen.

joey711 avatar joey711 commented on June 1, 2024

Actually, it seems that entries in @imports would must-often populate the Imports: field of DESCRIPTION, since those are packages that have a namespace.

The Depends: dependencies might need to be specified separately with an @Depends or equivalent. Part of the reason for this, IMHO, is that the Imports:/Depends: decision is contingent on whether that package has an appropriately-developed namespace, and also whether it is feasible/wise to have them "fully-loaded" in the global-environment. Since this is a tricky decision, and not necessarily based on the code within your own package, it seems the user will need to specify explicitly in some way.

@depends is sortof in the style of the require(pkgname) approach, and seems to fit with the rest of roxygen. I don't think this would interfere with the existing @imports / @importsFrom / etc. setup, which presumably would populate the Imports: field in a similar way that they populate the NAMESPACE file.

I just noticed it is possible (if a package has a namespace) to have it listed as a Depends: dependency in DESCRIPTION, but also imported with import(pkgname) in the NAMESPACE. Is this a conflict or redundant? If so, I need to change it in that package, but also a good example in favor of adding this feature (and checks) to roxygen.

from roxygen.

hadley avatar hadley commented on June 1, 2024

I now think this is a bad idea - it's better to do the opposite and use information in DESCRIPTION to automatically populate NAMESPACE. These days you should very rarely being using depends.

from roxygen.

Related Issues (20)

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.