Fixes filters using an aliased value#2615
Open
nickclark2016 wants to merge 1 commit intopremake:masterfrom
Open
Fixes filters using an aliased value#2615nickclark2016 wants to merge 1 commit intopremake:masterfrom
nickclark2016 wants to merge 1 commit intopremake:masterfrom
Conversation
d3d0158 to
12087d6
Compare
12087d6 to
fb0f79b
Compare
chrisant996
reviewed
Feb 2, 2026
| function suite.targetWithArm64FilterSuffix() | ||
| architecture "ARM64" | ||
|
|
||
| filter { "architecture:ARM64" } -- Should match when architecture is AARCH64 |
There was a problem hiding this comment.
Would it be worth adding a lowercase test?
There was a problem hiding this comment.
Or better yet, a mixed case test, e.g. aRm64.
Jarod42
reviewed
Feb 2, 2026
| x86_64 = "x64", | ||
| ARM = "ARM", | ||
| AARCH64 = "ARM64", | ||
| } |
Contributor
There was a problem hiding this comment.
It is now identical to vs200x_architectures.
It seems they can be regrouped, and so below function might be simplified.
Jarod42
reviewed
Feb 2, 2026
Comment on lines
+115
to
+121
| local field = p.field.get(key) | ||
| if field and field.aliases then | ||
| local aliased = field.aliases[value] | ||
| if aliased then | ||
| value = tostring(aliased):lower() | ||
| end | ||
| end |
Contributor
There was a problem hiding this comment.
That pattern is repeated 3 times, maybe create a subfunction, something like:
function p.field.alias_resolved(key, value) do
value = value:lower()
local field = p.field.get(key)
if field and field.aliases then
local aliased = field.aliases[value]
if aliased then
value = tostring(aliased):lower()
end
end
return value
end
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.
What does this PR do?
Fixes #2614
How does this PR change Premake's behavior?
No
Anything else we should know?
N/A
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!