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

feat: update namespace exports #1386

Closed
wants to merge 1 commit into from
Closed

Conversation

stdlib-bot
Copy link
Contributor

This PR

  • updates namespace exports

@stdlib-bot stdlib-bot added the automated-pr Automated pull request (e.g., from a bot). label Feb 25, 2024
@stdlib-bot stdlib-bot requested a review from a team February 25, 2024 20:42
* @type {Function}
* @see {@link module:@stdlib/ndarray/dispatch-by}
*/
setReadOnly( ns, 'dispatchBy', require( '@stdlib/ndarray/dispatch-by' ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be included.

* @type {Function}
* @see {@link module:@stdlib/random/exponential}
*/
setReadOnly( ns, 'exponential', require( '@stdlib/random/exponential' ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be exported until finalized.

* @type {Function}
* @see {@link module:@stdlib/strided/dispatch-by}
*/
setReadOnly( strided, 'dispatchBy', require( '@stdlib/strided/dispatch-by' ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be exported until finalized.

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter Did you manually run this workflow? I think we should just manually do this locally, as this is picking up things which should not be exported to namespaces as they are effectively WIPs.

@Planeshifter
Copy link
Member

Planeshifter commented Feb 25, 2024

@kgryte No; I changed the workflow and ESLint rule to actually apply the suggestions, which never worked previously.

I think it's easier to just automate this, but am aware that we have a bunch of packages we don't want to export for now.

However, we already support the following comment syntax

/*
* The following modules are intentionally not exported: tools
*/

Why don't we just list the respective packages there for the time being?

Can add a FIXME: comment in addition so we know to revert this later.

@kgryte
Copy link
Member

kgryte commented Feb 25, 2024

@Planeshifter Okay, but we also need to remember to add some of these packages to the REPL namespace. I typically use adding to the tree namespace as a way to remind myself to also add to the REPL namespace, so, for me, the lack of automation is intentional.

@kgryte
Copy link
Member

kgryte commented Feb 25, 2024

FWIW, I am okay with the namespace export rule just emitting warnings, rather than attempting to autofix.

@Planeshifter
Copy link
Member

Planeshifter commented Feb 25, 2024

Just for context, the underlying lint rule won't attempt to auto-fix by default or when committing changes to any of the files, only in this specific workflow due to the fix type being set to cover suggestions:

make FILES="${namespaces}" FIX=1 FIX_TYPE="suggestion" lint-javascript-files

As for the REPL namespace, what about having a workflow that updates a tracking issue with all packages currently not exported to namespace/lib/namespace?

@Planeshifter Planeshifter changed the title Update namespace exports feat: update namespace exports Feb 25, 2024
@kgryte
Copy link
Member

kgryte commented Feb 25, 2024

The tracking issue would likely be verrrry noisy. We should definitely have tooling for checking what is and what is not exported to the REPL, but I don't think a workflow and tracking issue is particularly useful.

@stdlib-bot stdlib-bot force-pushed the update-namespace-exports branch from eadb9de to e052dbf Compare February 25, 2024 22:13
@stdlib-bot stdlib-bot requested a review from a team February 25, 2024 22:13
@stdlib-bot stdlib-bot force-pushed the update-namespace-exports branch 16 times, most recently from e90a991 to fab4044 Compare February 29, 2024 02:37
@stdlib-bot stdlib-bot force-pushed the update-namespace-exports branch 17 times, most recently from e6fbaac to 800cdf0 Compare March 3, 2024 14:09
@stdlib-bot stdlib-bot force-pushed the update-namespace-exports branch from 800cdf0 to fc3fdbb Compare March 3, 2024 20:38
@kgryte kgryte closed this Mar 17, 2024
@kgryte kgryte deleted the update-namespace-exports branch March 17, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-pr Automated pull request (e.g., from a bot).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants