Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore infrastructure requirements to allow nesting modules inside packages #292

Open
2 tasks
klmr opened this issue Aug 26, 2022 · 1 comment
Open
2 tasks

Comments

@klmr
Copy link
Owner

klmr commented Aug 26, 2022

Please describe your feature request

Can the following ever work?

box::use(foo/bar)

Loads a module bar that’s defined inside the package foo.

Open questions

What happens when users say library(foo) (or indeed loadNamespace("foo"))? Is there some boilerplate code inside the package that (a) forbids this, (b) does nothing or (c) provides an alternative way of interacting with the modules nested under ‘foo’?

How does this work with the existing R package infrastructure (testing, checking, vignette building, static analysis/‘codetools’)?

(Why) is this desirable? (In particular: people like packages because of the convenience afforded by the infrastructure around packages, but what part of this are we giving up by having the code inside the package hidden away in submodules?)

How ergonomic is this? — Both for the users of the package as well as the developers of it?

Requirements

  • R packages don’t allow nested code, so the actual implementation needs to go under inst
  • Something (box?) needs to provide utilities to generate the package skeleton infrastructure
@klmr
Copy link
Owner Author

klmr commented Sep 10, 2022

See also #216.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant