Skip to content

Commit

Permalink
Add backend for Darwin availability annotations. (#857)
Browse files Browse the repository at this point in the history
* Add backend for Darwin availability annotations.

* Address review comment.

* Address review comment: don't hardcode the availability data filename.

* Address review comment: deprecating a container should deprecate its contents.
  • Loading branch information
bzbarsky-apple authored Dec 15, 2022
1 parent dac6f92 commit a4fdb58
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -878,13 +878,8 @@ async function if_is_fabric_scoped_struct(type, options) {
let packageIds = await templateUtil.ensureZclPackageIds(this);
let st = await zclQuery.selectStructByName(this.global.db, type, packageIds);

if (st) {
// TODO: Should know whether a struct is fabric-scoped without sniffing its
// members.
let fields = await zclQuery.selectAllStructItemsById(this.global.db, st.id);
if (fields.find((i) => i.type.toLowerCase() == 'fabric_idx')) {
return options.fn(this);
}
if (st && st.isFabricScoped) {
return options.fn(this);
}

return options.inverse(this);
Expand Down
Loading

0 comments on commit a4fdb58

Please sign in to comment.