Skip to content

feat: create metadata entries generator #272

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

araujogui
Copy link
Member

Description

Creates metadata entries generator

Related Issues

Fixes #271

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@araujogui araujogui changed the title Refactor parsers feat: create metadata entries generator May 14, 2025
@araujogui
Copy link
Member Author

araujogui commented May 15, 2025

Blocking this until #275 is merged.

Comment on lines 133 to 149
const releases = await getAllMajors();

await Promise.all(
docs.map(async doc => {
const { runGenerators } = createGenerator(doc);

await runGenerators({
generators: opts.target,
input: opts.input,
output: opts.output && resolve(opts.output),
version: coerce(opts.version),
releases,
gitRef: opts.gitRef,
threads: parseInt(opts.threads, 10),
});
})
);
Copy link
Member

Choose a reason for hiding this comment

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

I know this PR is still a draft, but I'm concerned that this will overload the system's CPU. We already run each generator on it's own thread, why do we need to iterate on each doc as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

@avivkeller It was a misunderstanding, fixed now. Can you take a look?

@araujogui araujogui marked this pull request as ready for review May 22, 2025 16:44
@araujogui araujogui requested a review from a team as a code owner May 22, 2025 16:44
console.error('Lint failed; aborting generation.');
process.exit(1);
}
// if (!opts.skipLint && !runLint(docs)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll fix this after #275 is merged, because we need the raw asts here.

@ovflowd
Copy link
Member

ovflowd commented May 23, 2025

@araujogui I saw there is a blocked label, could you elaborate what's blocked?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create metadata entries generator
3 participants