-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore Darwin APIs that went missing. (#31163)
We were inconsistent about our checks for the "allowed to not have params" case: some places used "command has no fields" as the check, and some used "command has only optional fields". This caused some APIs (for invoking commands with no params) to disappear when commands that used to have no fields got optional fields added to them. The fix: 1. Fixes the checks to consistently be "command has only optional fields" so the no-params APIs continue to exist for the commands that had optional fields added to them. 2. Fixes availability annotations for pre-existing commands with only optional fields so that we will not claim the no-params API is available before it was actually available, by basically listing all such commands in config-data.yaml. 3. Avoids generating deprecated overloads for the thins listed in item 2. 4. Moves the Darwin-only bits from the config-data.yaml in src/app into the Darwin version we are adding, and starts using that config file.
- Loading branch information
1 parent
52f66e1
commit ab58186
Showing
11 changed files
with
318 additions
and
16 deletions.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DarwinForceWritable: | ||
# Work-around for not allowing changes from writable to read-only | ||
# happened in https://github.com/project-chip/connectedhomeip/pull/30134 | ||
- ApplicationLauncher::CurrentApp | ||
- ContentLauncher::SupportedStreamingProtocols | ||
- FanControl::FanModeSequence | ||
|
||
# A list of commands that used to have only optional arguments before we started | ||
# generating the no-params-needed variants of methods for that case. These | ||
# declarations need to have availability based on when we started generating | ||
# those variants, not the command's own availability. | ||
LegacyCommandsWithOnlyOptionalArguments: | ||
- NetworkCommissioning::ScanNetworks | ||
- DoorLock::LockDoor | ||
- DoorLock::UnlockDoor | ||
- ApplicationLauncher::LaunchApp | ||
- ApplicationLauncher::StopApp | ||
- ApplicationLauncher::HideApp | ||
- UnitTesting::TestNullableOptionalRequest | ||
- UnitTesting::TestSimpleOptionalArgumentRequest |
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.