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

module: remove unnecessary nonInternalExists check #14664

Closed
wants to merge 1 commit into from

Conversation

JacksonTian
Copy link
Contributor

@JacksonTian JacksonTian commented Aug 7, 2017

The NativeModule.nonInternalExists(request) is unnecessary in
Module._resolveLookupPaths(), because the check is pre-exist in
Module._resolveFilename()

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

module

@nodejs-github-bot nodejs-github-bot added the module Issues and PRs related to the module subsystem. label Aug 7, 2017
@mscdex
Copy link
Contributor

mscdex commented Aug 7, 2017

Two issues:

  1. _resolveLookupPaths() is also used by repl, which might be affected by this?
  2. This has the same issue as lib: remove newReturn for Module._resolveLookupPaths #14642, in that there may be people using this "private" function and changing the behavior could break them. If we deprecate this function entirely to userland (and making it internal only), then the changes in this PR are not a problem.

@mscdex mscdex added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 7, 2017
@jasnell
Copy link
Member

jasnell commented Aug 23, 2017

@jasnell
Copy link
Member

jasnell commented Aug 23, 2017

@BridgeAR
Copy link
Member

As this is a semver-major, PTAL @nodejs/ctc

@BridgeAR
Copy link
Member

PTAL @nodejs/tsc

@addaleax
Copy link
Member

I have to admit that I shared @mscdex’s concerns.

@jasnell
Copy link
Member

jasnell commented Sep 14, 2017

Ping @ChALkeR ... any way we can get some stats on whether this function is used by userland?

@BridgeAR
Copy link
Member

How do we further progress here?

As this is semver-major anyway @nodejs/tsc PTAL

@BridgeAR
Copy link
Member

It would definitely be best to just deprecate the function and make it internal. That is always the safe way.

@JacksonTian would you be so kind and refactor this accordingly? I doubt that this will land as is otherwise and I would like to get this progressing again.

@MylesBorins
Copy link
Contributor

When refactoring can you please rebase against master

The NativeModule.nonInternalExists(request) is unnecessary in
Module._resolveLookupPaths(), because the check is pre-exist in
Module._resolveFilename()
@JacksonTian
Copy link
Contributor Author

Rebased with current master.

@BridgeAR
Copy link
Member

@JacksonTian do you still want to work on this? In that case it should be refactored to move the functionality to the internal part and deprecate the original one.

@BridgeAR
Copy link
Member

Closing due to long inactivity and no response. @JacksonTian please reopen if this is worked on again.

@BridgeAR BridgeAR closed this Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants