Skip to content
Commit 56f266d2 authored by Paul Duffin's avatar Paul Duffin
Browse files

Allow pruning of unsupported fields in structs in maps

Adds support for traversing into a field that is of type:
   map[...]*struct{...}

This is needed to allow java_sdk_library to mark scope specific
properties, e.g. public.annotations as being target build release
specific.

It was necessary to change the Scope field from:
   Scope map[*apiScope]scopeProperties
to:
   Scope map[*apiScope]*scopeProperties

That is because there is no way in go to change the field of a struct
value of a map. i.e. you cannot do the following, not even using
reflection:
   Scope[apiScopePublic].AnnotationsZip = nil

Bug: 204763318
Test: m nothing
Merged-In: Id103f70f55d4202971321ef4925cbec4b55f8136
Change-Id: Id103f70f55d4202971321ef4925cbec4b55f8136
(cherry picked from commit 106a3a4b)
parent 2f94ca54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment