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

"Smart" extract #15

Open
gillchristian opened this issue Sep 7, 2019 · 0 comments
Open

"Smart" extract #15

gillchristian opened this issue Sep 7, 2019 · 0 comments
Labels
Extract Extracting function types from TS modules

Comments

@gillchristian
Copy link
Member

gillchristian commented Sep 7, 2019

The current version of the extract is very naive. It runs the extract CLI (meant to extract only one module at a time) in parallel in each directory of DefinitelyTyped. Since each module takes between 10-20s, running it in my machine (one module at a time per core, 8 cores) takes ~4hs for only DefinitelyTyped.

That is only necessary for the first time. After that we extract only the modules that changed (that also applies for the whitelist #13).

There are a few options for DT:

  • Nightly update the repository (DT) and extract the types of the modules that changed.
  • Add a hook to DT repository (would require contacting maintainers) and update types from the changes to the repository.

For the whitelist:

  • Clone the whitelist in a machine (mine?) and nightly update repos and types that changed.
  • Use npm hooks to listen to new version of these packages (if there's such thing) to update types of those packages.
  • Have a mirror of npm with on only the whitelist and DT packages and keep have hooks to that for new packages versions. This seems like an overkill and if we ever do something like this is way down the road.
@gillchristian gillchristian added the Extract Extracting function types from TS modules label Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extract Extracting function types from TS modules
Projects
None yet
Development

No branches or pull requests

1 participant