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

Call git log only 1ce per library version #1344

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Conversation

partouf
Copy link
Member

@partouf partouf commented Jun 21, 2024

Step part of #1342

@@ -767,18 +768,24 @@ def get_build_annotations(self, buildfolder):
return json.loads(buffer)

def get_commit_hash(self) -> str:
Copy link
Member

@mattgodbolt mattgodbolt Jun 25, 2024

Choose a reason for hiding this comment

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

Might be more trouble than it's worth but tou could consider a @lru_cache which does maybe what you need here? (that is, caches and if nothing else changes it would return the same value. ( https://docs.python.org/3/library/functools.html )

Copy link
Member Author

Choose a reason for hiding this comment

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

caches are a bad idea here, it matters that before this the nightly install happens and libs may or may not have been refreshed

Copy link
Member

Choose a reason for hiding this comment

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

The cache is in-memory. It's similar to what you've implemented manually here; but honestly whatever works :)

@partouf partouf merged commit f737849 into main Jun 28, 2024
4 checks passed
@partouf partouf deleted the libbuild-gitcommitfix branch June 28, 2024 22:11
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