Skip to content

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Apr 9, 2025

I'm currently modifying this to work on JSX stuff; sending this refactor in early.

I'm going to add more stuff to the file loader for JSX, so converting its return into a struct will make a future PR simpler.

Additionally, there's no real need to use full locks here; sync maps are sufficient for all uses, so we can do everything in the loader lock-free (more or less). Actually, we don't need any locks or sync maps at all outside the one used to dedupe tasks.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

internal/compiler/program.go:154

  • The code still references p.files after the change to use p.processedFiles. Update the iteration to use p.processedFiles.files.
for _, file := range p.files {

@jakebailey
Copy link
Member Author

jakebailey commented Apr 9, 2025

Bug in the lint rule, nice.

EDIT: I can't fix it without golang/go#73278 or a bunch of finagling to fix up the CFG, so I'll just rename the var to make the lint rule happy.

@jakebailey
Copy link
Member Author

Realized that none of this even needs to be locked; we can just put the info onto the tasks, which we collect later anyway.

@jakebailey jakebailey added this pull request to the merge queue Apr 9, 2025
@jakebailey jakebailey removed this pull request from the merge queue due to a manual request Apr 9, 2025
@jakebailey jakebailey added this pull request to the merge queue Apr 9, 2025
Merged via the queue into main with commit 25d8ceb Apr 9, 2025
23 checks passed
@jakebailey jakebailey deleted the jabaile/lockfree-load branch April 9, 2025 18:54
shinichy pushed a commit to shinichy/typescript-go that referenced this pull request Apr 12, 2025
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants