Skip to content

Onboard the lib task to code generation caching and include it in generate - #64409

Closed
Wesley Wigham (weswigham) wants to merge 1 commit into
microsoft:mainfrom
weswigham:include-lib-copy-in-generate
Closed

Wesley Wigham (weswigham) wants to merge 1 commit into
microsoft:mainfrom
weswigham:include-lib-copy-in-generate

Conversation

@weswigham

Copy link
Copy Markdown
Member

Noticed this was done by watch/build, but not part of the broader codegen task (meaning diffs caused by it could get missed by the generate CI task). It's basically just a copy action, but codegen is codegen.

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

The process-wide fingerprint cache prevents build:watch from detecting edits to existing library files.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds cached library declaration copying to the broader code-generation workflow.

Changes:

  • Adds GeneratedDirectory caching with tests.
  • Introduces generate:libs and includes it in generate.
  • Documents the new task.
File Description
tools/​scripts/​gen/​generatedFile.test.mts Tests directory-output caching.
tools/​scripts/​gen/​generatedFile.mts Implements GeneratedDirectory.
Herebyfile.mjs Adds cached library generation tasks.
CONTRIBUTING.md Documents library generation.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Herebyfile.mjs
@jakebailey

Copy link
Copy Markdown
Member

I'm surprised this is needed, isn't it just a copy? What diffs do you mean?

@weswigham

Copy link
Copy Markdown
Member Author

I'm surprised this is needed, isn't it just a copy?

Yeah, though it also needed to delete lib files no-longer-present, which is a bug I've fixed here (we did remove a lib file once in the past).

What diffs do you mean?

I was thinking the target libs were still in git like the old LKG folder, but they aren't so... guess not. Still, it feels like this should be included in the codegen task set?

@jakebailey

Copy link
Copy Markdown
Member

There's no such difference anymore; what we ship is what's in the repo, no code generation at all besides copying it in from the DOM lib generator. So the only real step is copying it to built to be packaged up.

It doesn't feel like codegen to me, because every other generator makes thigs we commit?

@weswigham

Copy link
Copy Markdown
Member Author

Alright, we can just leave it as-is, not like it saves any real amount time to make a basic copy option incremental anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants