Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Read _atomModuleCache to get all the native dependencies while initializing package - #8826

Merged
nathansobo merged 3 commits into
atom:masterfrom
scv119:native-modules
Sep 17, 2015
Merged

nathansobo merged 3 commits into
atom:masterfrom
scv119:native-modules

Conversation

@scv119

@scv119 scv119 commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

Currently we traverse through submodules recursively to get all native modules while loading a given atom package. This could be quite slow for some package like nuclide-remote-projects, which takes 14 seconds to load for the first time.

In this PR, we utilize the native dependency information generated from apm, (which lies in _atomModuleCache['extensions']['.node']), to get all the transitive native dependencies for given package. And fallback to old approach if the field _atomModuleCache doesn't exist in package.json.

cc @kevinsawicki

Comment thread src/package.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Space needed between ? and []

@scv119

scv119 commented Sep 17, 2015

Copy link
Copy Markdown
Contributor Author

Comments addressed @kevinsawicki
Also, once the Atom is autoupdated (and it's buildin electron) , will Atom do anything automatically to rebuild all the native dependencies, or they just failed to load?

@kevinsawicki

Copy link
Copy Markdown
Contributor

Also, once the Atom is autoupdated (and it's buildin electron) , will Atom do anything automatically to rebuild all the native dependencies, or they just failed to load?

There is a UI for rebuilding them after upgrade, atom/incompatible-packages#9

@scv119

scv119 commented Sep 17, 2015

Copy link
Copy Markdown
Contributor Author

Woohoo, that looks great.

nathansobo pushed a commit that referenced this pull request Sep 17, 2015
@nathansobo
nathansobo merged commit 20dcdf7 into atom:master Sep 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants