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

[Merged by Bors] - feat: add git origin info to cache .ltar files #7143

Closed
wants to merge 3 commits into from

Conversation

digama0
Copy link
Member

@digama0 digama0 commented Sep 14, 2023

This should have no user-visible effects, but from here on .ltar files in the cache will contain the commit from which they were generated. Because of the way cache works, when you download the cache for a commit you might be using files built from several different commits, because later commits only invalidated some files and the old files are still good. If an .ltar file turns out to be bad (e.g. has a surprising .trace and is causing lake build to ignore it), this is helpful information for debugging, and it's only a few extra bytes in the file.

The new version of leantar has a new function: leantar -k 1234.ltar will print out the "comments" in the file. If it is a file generated by an old version of leantar it will be empty, but files generated subsequent to this commit will show something along the lines git=mathlib4@12de34 containing the commit sha for the run that generated this ltar file.


Open in Gitpod

@digama0
Copy link
Member Author

digama0 commented Sep 14, 2023

This has been tested on the nightly branch. You won't see any effects on this PR because it doesn't actually touch any mathlib files, so all the cache files are still using the old algorithm.

@semorrison
Copy link
Contributor

bors d+

@bors
Copy link

bors bot commented Sep 15, 2023

✌️ digama0 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@digama0
Copy link
Member Author

digama0 commented Sep 15, 2023

bors r+

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Sep 15, 2023
bors bot pushed a commit that referenced this pull request Sep 15, 2023
This should have no user-visible effects, but from here on `.ltar` files in the cache will contain the commit from which they were generated. Because of the way `cache` works, when you download the cache for a commit you might be using files built from several different commits, because later commits only invalidated some files and the old files are still good. If an `.ltar` file turns out to be bad (e.g. has a surprising `.trace` and is causing `lake build` to ignore it), this is helpful information for debugging, and it's only a few extra bytes in the file.

The new version of leantar has a new function: `leantar -k 1234.ltar` will print out the "comments" in the file. If it is a file generated by an old version of leantar it will be empty, but files generated subsequent to this commit will show something along the lines `git=mathlib4@12de34` containing the commit sha for the run that generated this ltar file.



Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@bors
Copy link

bors bot commented Sep 15, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: add git origin info to cache .ltar files [Merged by Bors] - feat: add git origin info to cache .ltar files Sep 15, 2023
@bors bors bot closed this Sep 15, 2023
@bors bors bot deleted the ltar_commit branch September 15, 2023 00:57
kodyvajjha pushed a commit that referenced this pull request Sep 22, 2023
This should have no user-visible effects, but from here on `.ltar` files in the cache will contain the commit from which they were generated. Because of the way `cache` works, when you download the cache for a commit you might be using files built from several different commits, because later commits only invalidated some files and the old files are still good. If an `.ltar` file turns out to be bad (e.g. has a surprising `.trace` and is causing `lake build` to ignore it), this is helpful information for debugging, and it's only a few extra bytes in the file.

The new version of leantar has a new function: `leantar -k 1234.ltar` will print out the "comments" in the file. If it is a file generated by an old version of leantar it will be empty, but files generated subsequent to this commit will show something along the lines `git=mathlib4@12de34` containing the commit sha for the run that generated this ltar file.



Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants