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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pkger runs only when necessary #449

Merged
merged 1 commit into from Jul 30, 2021

Conversation

lkingland
Copy link
Member

@lkingland lkingland commented Jul 30, 2021

Changes

馃悰 pkged.go generated only when ./templates change.
馃Ч makefile cleanup

/kind bug

Removes python caches on template test. When they existed, it caused a rebuild.

Adds pkger.go as an explicit entry in the CODE prerequisite var. This ensures pkged.go is generated if it doesn't exist, and removes the need to explicitly enumerate it as a prerequisite to other targets.

Adds pkger.go to the clean target. This allows a make clean && make to work as one might expect. For example ensuring a rebuild if a template file is removed.

The notable conceptual change here is that make does not induce a build of pkged.go by explicitly enumerating it as a prerequisite (a difficult thing to get right, and prone to errors in the future), but rather directly enumerates ./templates as its prerequisite.

Removes python caches on template test.  This appears to be the original
cause of unnecessary rebuilds.

Adds pkger.go as an explict entry in the CODE prerequisite var.  This
ensures pkged.go is generated if it doesn't exist, and removes the need
to explicitly enumerate it as a prerequisite to other targets.

Adds pkger.go to the clean target.  This allows a 'make clean && make' to
work as one might expect.  For example ensuring a rebuild if a template
files is removed.

The notable conceptual change here is that this does not induce a build of
pkged.go by explicitly enumarating it as a prerequisite (a difficult
thing to get right, and prone to errors in the future), but rather
directly enumerates ./templates as its prerequisite.

Additional minor modifications include:
- regenerated pkged.go such that this takes effect for main on merge
- adds an explicit target for the 'func' binary and aliases 'build'
- Makefile help text cleanup and consolidation
@knative-prow-robot knative-prow-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 30, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 30, 2021
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 30, 2021
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2021
@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance, lkingland

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

@knative-prow-robot knative-prow-robot merged commit 435d1ac into knative:main Jul 30, 2021
matejvasek added a commit to matejvasek/faas that referenced this pull request Jan 16, 2023
* fix: quarkus patch

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: update productized version

Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants