Commit 6c86e64e authored by Drew's avatar Drew

Ignore tool keys when warning from atllbuild

Previously, atllbuild would emit some spurious warnings when a tool key
was used such as `overlays`.  We now ignore all tool keys.
parent 98e03c9d
Pipeline #1056 failed with stage
Subproject commit e3037b4c5a38db2350564c07d17acadc32ff19fa
Subproject commit 17c1df6f7b55aac1d99ae8759eb0d143a741ff29
......@@ -202,7 +202,6 @@ final class ATllbuild : Tool {
static var allOptions : [Options] {
return [
Tool,
Name,
Dependencies,
OutputType,
......@@ -224,8 +223,12 @@ final class ATllbuild : Tool {
func run(task: Task) {
//warn if we don't understand an option
var knownOptions = Options.allOptions.map({$0.rawValue})
for option in Task.Option.allOptions.map({$0.rawValue}) {
knownOptions.append(option)
}
for key in task.allKeys {
if !Options.allOptions.map({$0.rawValue}).contains(key) {
if !knownOptions.contains(key) {
print("Warning: unknown option \(key) for task \(task.qualifiedName)")
}
}
......
......@@ -27,7 +27,6 @@
:sources ["src/**.swift"]
:name "overlay"
:output-type "static-library"
:germany "awesome"
:compile-options []
}
}
......
......@@ -64,6 +64,13 @@ if ! grep "germany" /tmp/warnings.txt; then
exit 1
fi
cd $DIR/tests/fixtures/overlay
$ATBUILD --use-overlay got-overlay > /tmp/warnings.txt
if grep "Warning: " /tmp/warnings.txt; then
echo "Got a warning when building the overlay fixture"
exit 1
fi
echo "****************HELP TEST*********************"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment