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

Use overlay FS when building projects #144

Merged
merged 23 commits into from
Mar 15, 2024
Merged

Use overlay FS when building projects #144

merged 23 commits into from
Mar 15, 2024

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Mar 14, 2024

Currently, we install a repo, then run TS on it, then run TS on it again. This creates a situation where the results of the first compile can negatively affect the second.

In #131, I attempted to fix this by using git to stage all files after installing (even if ignored), then reverting them. That didn't work because FS/memory cost of that was too high for the runner.

Instead, we can use OverlayFS to do this; we install into the lower layer, then perform all operations on an upper layer. After the first run, we throw away the overlay and create a new one, such that the second compilation sees the repo as being freshly installed.

If tmpfs is disabled, we instead use multiple directories and just reflink copy them. Theoretically we could use copying within the tmpfs too, but I don't believe that tmpfs can do that.

This PR is best viewed without whitespace due to indent changes: https://github.com/microsoft/typescript-error-deltas/pull/144/files?w=1

(Redo of #143)

@jakebailey
Copy link
Member Author

Yay, it works! No puppeteer mentioned on microsoft/TypeScript#57785 (comment).

@jakebailey jakebailey merged commit 3b3b4da into main Mar 15, 2024
2 checks passed
@jakebailey jakebailey deleted the overlay branch March 15, 2024 21:35
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.

1 participant