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

adds deferred variable cache to common.mk #2537

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

jaxesn
Copy link
Member

@jaxesn jaxesn commented Oct 11, 2023

Issue #, if available:

Description of changes:

We use a decent amount of shell calls in out makefiles. Because we currently defer these, they get resolved a number of times, every time they are used in the context of the makefile. We could change these to immediately resolved variables, however that means we would exec these shell calls at the start of every make invocation, even tho they may not be needed for the specific target being called. This PR introduces a caching mechanism for these deferred variables and a helper to overwrite variables by name to be automatically cached on their first resolution.

Commits:

  • adds helper and caches shell, or otherwise, expensive vars
  • changes all project makefiles to defer git_tag and golang version since these are now cached after first use

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 11, 2023
@jaxesn jaxesn force-pushed the jgw/add-makefile-cache branch from 32da812 to e29b68f Compare October 11, 2023 11:41
@abhay-krishna
Copy link
Member

/lgtm
/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit 403b5ec into aws:main Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants