-
Notifications
You must be signed in to change notification settings - Fork 268
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
Fixing Build Regression [BISON] #892
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
db34c27
Run make all before compiling base image.
seanmorris 1a80342
Simplifying Makefile.
seanmorris 8b8d60b
Reverting artifacts.
seanmorris 9df50ac
Reverting artifacts.
seanmorris 3a0548f
Merge branch 'trunk' into sm-make-deps-before-compile
seanmorris c4cfd1e
Reverting artifacts.
seanmorris fcb65d3
Makefile comment.
seanmorris c8574a8
Redacting
seanmorris 5601da8
Make all.
seanmorris 15cca11
Resorting makefile.
seanmorris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the
base-image
depend on theall
target or is that incidental here?otherwise it seems like the
Makefile
would be the place to list dependencies, wouldn't it? why aren't we putting it there?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmsnell The
base-image
target does not depend on theall
target.wordpress-playground/packages/php-wasm/compile/Makefile
Lines 1 to 2 in db34c27
(Its generally poor practice to use a
PHONY
target as a dependency because that means anything downstream from that target would be rebuilt on every invocation.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmsnell Actually its fine so long as phony targets are used as dependencies ONLY of other phony targets:
wordpress-playground/packages/php-wasm/compile/Makefile
Lines 9 to 13 in c4cfd1e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seanmorris I think we might have jumped a little too quickly here. I wasn't asking if
base-image
currently is encoded as depending onall
, but rather was asking about your change, which seemed to be encoding a dependency outside of theMakefile
. previously we asked forbase-image
, but with your change we were also asking forall
. this communicated to me thatall
is necessary to buildbase-image
, and if that were actually true then I think it would be best to leave the dependencies insidemake
where they are handled robustly.as for
.PHONY
I think there may also be some misunderstandings. we should use them wherever they are part of a dependency hierarchy, whether or not they are a dependency of another.PHONY
or not. the distinction is purely whether the.PHONY
targets need to be rebuilt every timemake
runs. for example, it could be that some build target needs to download a configuration from the internet. that download would be a candidate.PHONY
target, but that doesn't force other targets to rebuild because we could make those other targets depend on the downloaded configuration file directly, and simply not update it if the download is the same as it previously was.making
all
a.PHONY
target is common because people generally don't want to put sub-dependencies on theall
target, and even ifall
is.PHONY
and runs every time, if the dependencies of the dependencies haven't changed than nothing much will run.so we want to be judicious and thoughtful when applying
.PHONY
, but it's also not something we want to try and avoid; we only want to understand its purpose and value and use it where appropriate.I can see that we have a number of ways we could improve the
Makefile
, but those don't need to occur in this PR.