Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Support package-defined import scope #82

Open
Yethal opened this issue Aug 17, 2022 · 0 comments
Open

Support package-defined import scope #82

Yethal opened this issue Aug 17, 2022 · 0 comments
Labels
feature-request New feature or request priority: low No hurry, can wait to any other minor release refactor Code should be refactored
Milestone

Comments

@Yethal
Copy link
Collaborator

Yethal commented Aug 17, 2022

Related problem

Currently whenever we install a package we add to scope all of the exported symbols via use package.nu *. However, some packages may want to only add a portion of their exported symbols to their global scope (or even none at all).

Describe the solution you'd like

Package metadata should contain a list of symbols that should be imported into the global scope during package installation. This list should be read during package installation and used to build the import expression instead of the hardcoded use package.nu * we use currently.
Symbol list should support some sort of wildcard (* ?) to allow maintainers to export all symbols from module without listing them one by one.
Installation of packages with no exported symbols should effectively behave the same regardless of whether --add-to-scope flag was added

Describe alternatives you've considered

No response

Additional context and details

No response

@Yethal Yethal added the feature-request New feature or request label Aug 17, 2022
@skelly37 skelly37 added this to the 1.0.0 milestone Aug 17, 2022
@skelly37 skelly37 added refactor Code should be refactored priority: low No hurry, can wait to any other minor release labels Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or request priority: low No hurry, can wait to any other minor release refactor Code should be refactored
Projects
None yet
Development

No branches or pull requests

2 participants