Update variables override mechanism to append#368
Merged
SuperSandro2000 merged 2 commits intomainfrom Sep 17, 2025
Merged
Conversation
This reverts commit f56b186.
This is not generally required, and could manually be added as command line argumen when needed e.g. to debug a Makefile. > `--warn-undefined-variables' > > Issue a warning message whenever make sees a reference to an undefined > variable. This can be helpful when you are trying to debug makefiles > which use variables in complex ways.
Contributor
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
VoigtS
approved these changes
Sep 17, 2025
majewsky
reviewed
Sep 23, 2025
| # SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| MAKEFLAGS=--warn-undefined-variables |
Contributor
There was a problem hiding this comment.
I object to this being removed. Let's please figure out a way to bring this back, since this has already caught bugs in the past.
Contributor
|
Reverting this entire PR via #373 because it breaks the documented behavior. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The updated mechanism brought by #362 behaves differently to the behavior in #352 in a way that it prepends to the variable not appends to it when overriding with environment - which makes the overall feature of "adding to a variable" less useful.
The PRs reverts #362 and configures
Makefileto not produce warnings on unused variables by default:Remove MAKEFLAGS=--warn-undefined-variables
This is not generally required, and could manually be added as command
line argumen when needed e.g. to debug a Makefile.
A practical example. The following configuration works perfectly fine both in regular CI workflow and on local machine:
but making it execute with
-short=false(e.g. in a nightly CI workflow) requires providing all other arguments as well, as+=prepends to a variable, not appends to it as seen below.Given the following
Makefile:it produces:
Whereas a
Makefileupdated toproduces:
which would result to an overridden argument when used with e.g.
go test.