shrinkwraptool 2026.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. shrinkwrap/__init__.py +1 -0
  2. shrinkwrap/__main__.py +4 -0
  3. shrinkwrap/commands/__init__.py +0 -0
  4. shrinkwrap/commands/build.py +118 -0
  5. shrinkwrap/commands/buildall.py +214 -0
  6. shrinkwrap/commands/clean.py +201 -0
  7. shrinkwrap/commands/inspect.py +272 -0
  8. shrinkwrap/commands/process.py +129 -0
  9. shrinkwrap/commands/run.py +374 -0
  10. shrinkwrap/config/FVP_Base_RevC-2xAEMvA-base.yaml +98 -0
  11. shrinkwrap/config/FVP_Base_RevC-2xAEMvA-rme.yaml +44 -0
  12. shrinkwrap/config/arch/v8.0.yaml +22 -0
  13. shrinkwrap/config/arch/v8.1.yaml +26 -0
  14. shrinkwrap/config/arch/v8.2.yaml +28 -0
  15. shrinkwrap/config/arch/v8.3.yaml +25 -0
  16. shrinkwrap/config/arch/v8.4.yaml +26 -0
  17. shrinkwrap/config/arch/v8.5.yaml +29 -0
  18. shrinkwrap/config/arch/v8.6.yaml +28 -0
  19. shrinkwrap/config/arch/v8.7.yaml +24 -0
  20. shrinkwrap/config/arch/v8.8.yaml +31 -0
  21. shrinkwrap/config/arch/v8.9.yaml +32 -0
  22. shrinkwrap/config/arch/v9.0.yaml +29 -0
  23. shrinkwrap/config/arch/v9.1.yaml +25 -0
  24. shrinkwrap/config/arch/v9.2.yaml +29 -0
  25. shrinkwrap/config/arch/v9.3.yaml +23 -0
  26. shrinkwrap/config/arch/v9.4.yaml +21 -0
  27. shrinkwrap/config/arch/v9.5.yaml +20 -0
  28. shrinkwrap/config/arch/v9.6.yaml +22 -0
  29. shrinkwrap/config/arch/v9.7.yaml +31 -0
  30. shrinkwrap/config/bootwrapper.yaml +76 -0
  31. shrinkwrap/config/buildroot.config +16 -0
  32. shrinkwrap/config/buildroot.yaml +54 -0
  33. shrinkwrap/config/cca-3world.yaml +220 -0
  34. shrinkwrap/config/cca-4world.yaml +62 -0
  35. shrinkwrap/config/cca-edk2.yaml +58 -0
  36. shrinkwrap/config/debug/armdbg.yaml +16 -0
  37. shrinkwrap/config/debug/rmm.yaml +12 -0
  38. shrinkwrap/config/debug/tfa.yaml +12 -0
  39. shrinkwrap/config/debug/tftf.yaml +13 -0
  40. shrinkwrap/config/dt-base.yaml +115 -0
  41. shrinkwrap/config/edk2-base.yaml +83 -0
  42. shrinkwrap/config/ffa-hafnium-optee.yaml +45 -0
  43. shrinkwrap/config/ffa-optee.yaml +30 -0
  44. shrinkwrap/config/ffa-tftf.yaml +26 -0
  45. shrinkwrap/config/hafnium-base.yaml +59 -0
  46. shrinkwrap/config/kvm-unit-tests.yaml +32 -0
  47. shrinkwrap/config/kvmtool-base.yaml +33 -0
  48. shrinkwrap/config/linux-base.yaml +80 -0
  49. shrinkwrap/config/ns-edk2-base.yaml +83 -0
  50. shrinkwrap/config/ns-edk2-optee.yaml +41 -0
  51. shrinkwrap/config/ns-edk2.yaml +49 -0
  52. shrinkwrap/config/ns-preload.yaml +98 -0
  53. shrinkwrap/config/optee-base.yaml +37 -0
  54. shrinkwrap/config/rfa-base.yaml +48 -0
  55. shrinkwrap/config/rfa.yaml +57 -0
  56. shrinkwrap/config/rmm-base.yaml +53 -0
  57. shrinkwrap/config/rust.yaml +31 -0
  58. shrinkwrap/config/tfa-base.yaml +72 -0
  59. shrinkwrap/config/tfa-rme.yaml +37 -0
  60. shrinkwrap/config/tftf-base.yaml +61 -0
  61. shrinkwrap/shrinkwrap_main.py +161 -0
  62. shrinkwrap/utils/__init__.py +0 -0
  63. shrinkwrap/utils/clivars.py +16 -0
  64. shrinkwrap/utils/config.py +1358 -0
  65. shrinkwrap/utils/graph.py +257 -0
  66. shrinkwrap/utils/label.py +155 -0
  67. shrinkwrap/utils/logger.py +162 -0
  68. shrinkwrap/utils/process.py +224 -0
  69. shrinkwrap/utils/runtime.py +195 -0
  70. shrinkwrap/utils/ssh_agent.py +100 -0
  71. shrinkwrap/utils/tty.py +63 -0
  72. shrinkwrap/utils/vars.py +15 -0
  73. shrinkwrap/utils/workspace.py +63 -0
  74. shrinkwraptool-2026.9.0.dist-info/METADATA +57 -0
  75. shrinkwraptool-2026.9.0.dist-info/RECORD +79 -0
  76. shrinkwraptool-2026.9.0.dist-info/WHEEL +5 -0
  77. shrinkwraptool-2026.9.0.dist-info/entry_points.txt +2 -0
  78. shrinkwraptool-2026.9.0.dist-info/licenses/license.rst +41 -0
  79. shrinkwraptool-2026.9.0.dist-info/top_level.txt +1 -0
shrinkwrap/__init__.py ADDED
@@ -0,0 +1 @@
1
+ __version__ = "2026.9.0"
shrinkwrap/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .shrinkwrap_main import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
File without changes
@@ -0,0 +1,118 @@
1
+ # Copyright (c) 2022, Arm Limited.
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ import os
5
+ import shrinkwrap.commands.buildall as buildall
6
+ import shrinkwrap.utils.vars as vars
7
+
8
+
9
+ cmd_name = os.path.splitext(os.path.basename(__file__))[0]
10
+
11
+
12
+ def add_parser(parser, formatter):
13
+ """
14
+ Part of the command interface expected by shrinkwrap.py. Adds the
15
+ subcommand to the parser, along with all options and documentation.
16
+ Returns the subcommand name.
17
+ """
18
+ cmdp = parser.add_parser(
19
+ cmd_name,
20
+ formatter_class=formatter,
21
+ help="""Builds a specified config and packages it ready
22
+ to run.""",
23
+ epilog="""Custom config store(s) can be defined at at
24
+ <SHRINKWRAP_CONFIG> as a colon-separated list of
25
+ directories. Building is done at <SHRINKWRAP_BUILD> and
26
+ output is saved to <SHRINKWRAP_PACKAGE>. The package
27
+ includes all FW binaries, a manifest and a build.sh script
28
+ containing all the commands that were executed per config.
29
+ Any pre-existing config package directory is first deleted.
30
+ Shrinkwrap will always search its default config store even
31
+ if <SHRINKWRAP_CONFIG> is not defined. <SHRINKWRAP_BUILD>
32
+ and <SHRINKWRAP_PACKAGE> default to '~/.shrinkwrap/build'
33
+ and '~/.shrinkwrap/package'. The user can override them by
34
+ setting the environment variables.""",
35
+ )
36
+
37
+ cmdp.add_argument(
38
+ "config",
39
+ metavar="config",
40
+ help="""Config to build. If the config exists relative to the
41
+ current directory that config is used. Else if the config
42
+ exists relative to the config store then it is used.""",
43
+ )
44
+
45
+ cmdp.add_argument(
46
+ "-b",
47
+ "--btvar",
48
+ metavar="key=value",
49
+ required=False,
50
+ default=[],
51
+ action="append",
52
+ help="""Override value for a single build-time variable defined
53
+ by the config. Specify option multiple times for multiple
54
+ variables. Overrides for variables that have a default
55
+ specified by the config are optional.""",
56
+ )
57
+
58
+ cmdp.add_argument(
59
+ "-s",
60
+ "--no-sync",
61
+ metavar="component",
62
+ required=False,
63
+ default=[],
64
+ action="append",
65
+ help="""Optionally specify any components whose git repos should
66
+ not be synced. For all other components, Shrinkwrap ensures
67
+ that all repos are clean and checked out at the correct
68
+ revision. Option can be specified multiple times.""",
69
+ )
70
+
71
+ cmdp.add_argument(
72
+ "--no-sync-all",
73
+ required=False,
74
+ default=False,
75
+ action="store_true",
76
+ help="""Do not sync repos for any component, as if --no-sync was
77
+ specified for every component in the config.""",
78
+ )
79
+
80
+ cmdp.add_argument(
81
+ "--force-sync",
82
+ metavar="component",
83
+ required=False,
84
+ default=[],
85
+ action="append",
86
+ help="""Synchronize the repo of the given component even if the local
87
+ source directory contains unsaved changes. YOUR CHANGES WILL BE
88
+ LOST! In addition, download updates from remote branches.""",
89
+ )
90
+
91
+ cmdp.add_argument(
92
+ "--force-sync-all",
93
+ required=False,
94
+ default=False,
95
+ action="store_true",
96
+ help="""Synchronize all components even if the local source directories
97
+ contain unsaved changes. YOUR CHANGES WILL BE LOST! In addition,
98
+ download all remote branch updates. Note that this will override
99
+ any 'sync: false' config option.""",
100
+ )
101
+
102
+ buildall.add_common_args(cmdp)
103
+
104
+ return cmd_name
105
+
106
+
107
+ def dispatch(args):
108
+ """
109
+ Part of the command interface expected by shrinkwrap.py. Called to
110
+ execute the subcommand, with the arguments the user passed on the
111
+ command line. The arguments comply with those requested in add_parser().
112
+ """
113
+ btvars = vars.parse(args.btvar, type="bt")
114
+ if args.no_sync_all:
115
+ args.no_sync = True
116
+ if args.force_sync_all:
117
+ args.force_sync = True
118
+ buildall.build([args.config], [btvars], args.no_sync, args.force_sync, args)
@@ -0,0 +1,214 @@
1
+ # Copyright (c) 2022, Arm Limited.
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ import os
5
+ import yaml
6
+ import shrinkwrap.utils.config as config
7
+ import shrinkwrap.utils.graph as ugraph
8
+ import shrinkwrap.utils.runtime as runtime
9
+ import shrinkwrap.utils.workspace as workspace
10
+
11
+
12
+ cmd_name = os.path.splitext(os.path.basename(__file__))[0]
13
+
14
+
15
+ def dflt_jobs():
16
+ return min(os.cpu_count() // 2, 32)
17
+
18
+
19
+ def add_parser(parser, formatter):
20
+ """
21
+ Part of the command interface expected by shrinkwrap.py. Adds the
22
+ subcommand to the parser, along with all options and documentation.
23
+ Returns the subcommand name.
24
+ """
25
+ cmdp = parser.add_parser(
26
+ cmd_name,
27
+ formatter_class=formatter,
28
+ help="""Builds either all concrete standard configs or an
29
+ explicitly specified set of configs and packages them ready
30
+ to run.""",
31
+ epilog="""Custom config store(s) can be defined at at
32
+ <SHRINKWRAP_CONFIG> as a colon-separated list of
33
+ directories. Building is done at <SHRINKWRAP_BUILD> and
34
+ output is saved to <SHRINKWRAP_PACKAGE>. The package
35
+ includes all FW binaries, a manifest and a build.sh script
36
+ containing all the commands that were executed per config.
37
+ Any pre-existing config package directory is first deleted.
38
+ Shrinkwrap will always search its default config store even
39
+ if <SHRINKWRAP_CONFIG> is not defined. <SHRINKWRAP_BUILD>
40
+ and <SHRINKWRAP_PACKAGE> default to '~/.shrinkwrap/build'
41
+ and '~/.shrinkwrap/package'. The user can override them by
42
+ setting the environment variables.""",
43
+ )
44
+
45
+ cmdp.add_argument(
46
+ "configs",
47
+ metavar="yamlfile",
48
+ help="""A yaml file containing all the configs to be built. The
49
+ top level dictionary contains a 'configs' key, whose value
50
+ is a list of dictionaries, each with a 'config' key, whose
51
+ value is a config filename.""",
52
+ )
53
+
54
+ add_common_args(cmdp)
55
+
56
+ return cmd_name
57
+
58
+
59
+ def add_common_args(cmdp):
60
+ """
61
+ Common args shared between build and buildmulti.
62
+ """
63
+ cmdp.add_argument(
64
+ "-o",
65
+ "--overlay",
66
+ metavar="cfgfile",
67
+ required=False,
68
+ default=[],
69
+ action="append",
70
+ help="""Optional config file overlay to override run-time and
71
+ build-time settings. Only entries within the "build",
72
+ "buildex" and "run" sections are used. Applied to all
73
+ configs being built. Can be specified multiple times;
74
+ left-most overlay is the first overlay applied.""",
75
+ )
76
+
77
+ cmdp.add_argument(
78
+ "-t",
79
+ "--tasks",
80
+ required=False,
81
+ default=dflt_jobs(),
82
+ metavar="count",
83
+ type=int,
84
+ help="""Maximum number of "high-level" tasks that will be
85
+ performed in parallel by Shrinkwrap. Tasks include syncing
86
+ git repositories, building components and copying
87
+ artifacts. Default={}""".format(dflt_jobs()),
88
+ )
89
+
90
+ cmdp.add_argument(
91
+ "-j",
92
+ "--jobs",
93
+ required=False,
94
+ default=dflt_jobs(),
95
+ metavar="count",
96
+ type=int,
97
+ help="""Maximum number of low-level jobs that will be
98
+ performed in parallel by each component build task.
99
+ Default={}""".format(dflt_jobs()),
100
+ )
101
+
102
+ cmdp.add_argument(
103
+ "-v",
104
+ "--verbose",
105
+ required=False,
106
+ default=False,
107
+ action="store_true",
108
+ help="""If specified, the output from all executed commands will
109
+ be displayed. It is advisable to set tasks to 1 when
110
+ this option is selected.""",
111
+ )
112
+
113
+ cmdp.add_argument(
114
+ "-n",
115
+ "--dry-run",
116
+ required=False,
117
+ default=False,
118
+ action="store_true",
119
+ help="""If specified, <SHRINKWRAP_BUILD> and
120
+ <SHRINKWRAP_PACKAGE> will not be touched and none of the
121
+ build commands will be executed. Instead the set of
122
+ commands that would have been executed are output to stdout
123
+ as a bash script.""",
124
+ )
125
+
126
+ cmdp.add_argument(
127
+ "-c",
128
+ "--no-color",
129
+ required=False,
130
+ default=False,
131
+ action="store_true",
132
+ help="""If specified, logs will not be colorized.""",
133
+ )
134
+
135
+
136
+ def dispatch(args):
137
+ """
138
+ Part of the command interface expected by shrinkwrap.py. Called to
139
+ execute the subcommand, with the arguments the user passed on the
140
+ command line. The arguments comply with those requested in add_parser().
141
+ """
142
+ with open(args.configs) as file:
143
+ cfgs = yaml.safe_load(file)
144
+
145
+ configs = [c["config"] for c in cfgs["configs"]]
146
+ btvarss = [c["btvars"] for c in cfgs["configs"]]
147
+ build(configs, btvarss, [], [], args)
148
+
149
+
150
+ def build(configs, btvarss, nosync, force_sync, args):
151
+ """
152
+ Concurrently builds a list of configs. Intended to be called as a common
153
+ handler for the build and buildmulti commands.
154
+ """
155
+ clivars = {"jobs": args.jobs}
156
+ configs = config.load_resolveb_all(configs, args.overlay, clivars, btvarss)
157
+ graph = config.build_graph(configs, args.verbose, nosync, force_sync)
158
+
159
+ if args.dry_run:
160
+ script = ugraph.make_script(graph)
161
+ print(script)
162
+ else:
163
+ if args.verbose:
164
+ workspace.dump()
165
+
166
+ # Run under a runtime environment, which may just run commands
167
+ # natively on the host or may execute commands in a container,
168
+ # depending on what the user specified.
169
+ with runtime.Runtime(
170
+ name=args.runtime,
171
+ image=config.get_image(configs, args),
172
+ ssh_agent_keys=args.ssh_agent_keys,
173
+ ) as rt:
174
+
175
+ def add_volume(path, levels_up=0):
176
+ while levels_up:
177
+ path = os.path.dirname(path)
178
+ levels_up -= 1
179
+ os.makedirs(path, exist_ok=True)
180
+ rt.add_volume(path)
181
+
182
+ add_volume(workspace.build)
183
+ add_volume(workspace.package)
184
+ for c in workspace.configs():
185
+ add_volume(c)
186
+
187
+ for conf in configs:
188
+ for comp in conf["build"].values():
189
+ add_volume(comp["sourcedir"], 1)
190
+ add_volume(comp["builddir"])
191
+
192
+ for btvar in conf["buildex"]["btvars"].values():
193
+ if btvar["type"] == "path":
194
+ rt.add_volume(btvar["value"])
195
+
196
+ if workspace.project_cache:
197
+ add_volume(workspace.project_cache)
198
+
199
+ rt.start()
200
+
201
+ ugraph.execute(graph, args.tasks, args.verbose, not args.no_color)
202
+
203
+ for c in configs:
204
+ # Dump the config.
205
+ cfg_name = os.path.join(workspace.package, f"{c['name']}.yaml")
206
+ with open(cfg_name, "w") as cfg:
207
+ config.dump(c, cfg)
208
+
209
+ # Dump the script to build the config.
210
+ graph = config.build_graph([c], args.verbose, nosync, force_sync)
211
+ script = ugraph.make_script(graph)
212
+ build_name = os.path.join(workspace.package, c["name"], "build.sh")
213
+ with open(build_name, "w") as build:
214
+ build.write(script)
@@ -0,0 +1,201 @@
1
+ # Copyright (c) 2022, Arm Limited.
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ import os
5
+ import shrinkwrap.utils.config as config
6
+ import shrinkwrap.utils.graph as ugraph
7
+ import shrinkwrap.utils.runtime as runtime
8
+ import shrinkwrap.utils.workspace as workspace
9
+
10
+
11
+ cmd_name = os.path.splitext(os.path.basename(__file__))[0]
12
+
13
+
14
+ def dflt_jobs():
15
+ return min(os.cpu_count() // 2, 32)
16
+
17
+
18
+ def add_parser(parser, formatter):
19
+ """
20
+ Part of the command interface expected by shrinkwrap.py. Adds the
21
+ subcommand to the parser, along with all options and documentation.
22
+ Returns the subcommand name.
23
+ """
24
+ cmdp = parser.add_parser(
25
+ cmd_name,
26
+ formatter_class=formatter,
27
+ help="""Cleans either all concrete standard configs or an
28
+ explicitly specified set of configs, ready to be rebuilt
29
+ from scratch.""",
30
+ )
31
+
32
+ cmdp.add_argument(
33
+ "configs",
34
+ metavar="config",
35
+ nargs="*",
36
+ help="""0 or more configs to clean. If a config exists relative
37
+ to the current directory that config is used. Else if a
38
+ config exists relative to the config store then it is used.
39
+ If no configs are provided, all concrete configs in the
40
+ config store are cleaned.""",
41
+ )
42
+
43
+ cmdp.add_argument(
44
+ "-o",
45
+ "--overlay",
46
+ metavar="cfgfile",
47
+ required=False,
48
+ default=[],
49
+ action="append",
50
+ help="""Optional config file overlay to override run-time and
51
+ build-time settings. Only entries within the "build",
52
+ "buildex" and "run" sections are used. Applied to all
53
+ configs being built. Can be specified multiple times;
54
+ left-most overlay is the first overlay applied.""",
55
+ )
56
+
57
+ cmdp.add_argument(
58
+ "-t",
59
+ "--tasks",
60
+ required=False,
61
+ default=dflt_jobs(),
62
+ metavar="count",
63
+ type=int,
64
+ help="""Maximum number of "high-level" tasks that will be
65
+ performed in parallel by Shrinkwrap. Tasks include cleaning
66
+ components. Default={}""".format(dflt_jobs()),
67
+ )
68
+
69
+ cmdp.add_argument(
70
+ "-j",
71
+ "--jobs",
72
+ required=False,
73
+ default=dflt_jobs(),
74
+ metavar="count",
75
+ type=int,
76
+ help="""Maximum number of low-level jobs that will be
77
+ performed in parallel by each component clean task.
78
+ Default={}""".format(dflt_jobs()),
79
+ )
80
+
81
+ cmdp.add_argument(
82
+ "-v",
83
+ "--verbose",
84
+ required=False,
85
+ default=False,
86
+ action="store_true",
87
+ help="""If specified, the output from all executed commands will
88
+ be displayed. It is advisable to set tasks to 1 when
89
+ this option is selected.""",
90
+ )
91
+
92
+ cmdp.add_argument(
93
+ "-n",
94
+ "--dry-run",
95
+ required=False,
96
+ default=False,
97
+ action="store_true",
98
+ help="""If specified, none of the clean commands will be
99
+ executed. Instead the set of commands that would have been
100
+ executed are output to stdout as a bash script.""",
101
+ )
102
+
103
+ cmdp.add_argument(
104
+ "-c",
105
+ "--no-color",
106
+ required=False,
107
+ default=False,
108
+ action="store_true",
109
+ help="""If specified, logs will not be colorized.""",
110
+ )
111
+
112
+ cmdp.add_argument(
113
+ "-f",
114
+ "--filter",
115
+ metavar="[config.]component",
116
+ required=False,
117
+ default=[],
118
+ action="append",
119
+ help="""Optionally specify the components to clean. Option can
120
+ be specified multiple times to clean multiple components.
121
+ If not specified, all components are cleaned. If 'config.'
122
+ is omitted, component is cleaned for all configs being
123
+ cleaned (component must exist in all configs being
124
+ cleaned).""",
125
+ )
126
+
127
+ return cmd_name
128
+
129
+
130
+ def dispatch(args):
131
+ """
132
+ Part of the command interface expected by shrinkwrap.py. Called to
133
+ execute the subcommand, with the arguments the user passed on the
134
+ command line. The arguments comply with those requested in add_parser().
135
+ """
136
+ clivars = {"jobs": args.jobs}
137
+ configs = config.load_resolveb_all(args.configs, args.overlay, clivars)
138
+ if len(args.configs) == 0:
139
+ configs = [c for c in configs if c["concrete"]]
140
+ for conf in configs:
141
+ conf["graph"] = _filter(conf["name"], conf["graph"], args.filter)
142
+
143
+ graph = config.clean_graph(configs, args.verbose)
144
+
145
+ if args.dry_run:
146
+ script = ugraph.make_script(graph)
147
+ print(script)
148
+ else:
149
+ if args.verbose:
150
+ workspace.dump()
151
+
152
+ # Run under a runtime environment, which may just run commands
153
+ # natively on the host or may execute commands in a container,
154
+ # depending on what the user specified.
155
+ with runtime.Runtime(
156
+ name=args.runtime,
157
+ image=config.get_image(configs, args),
158
+ ssh_agent_keys=args.ssh_agent_keys,
159
+ ) as rt:
160
+
161
+ def add_volume(path, levels_up=0):
162
+ while levels_up:
163
+ path = os.path.dirname(path)
164
+ levels_up -= 1
165
+ os.makedirs(path, exist_ok=True)
166
+ rt.add_volume(path)
167
+
168
+ add_volume(workspace.build)
169
+ add_volume(workspace.package)
170
+
171
+ for conf in configs:
172
+ for comp in conf["build"].values():
173
+ add_volume(comp["sourcedir"], 1)
174
+ add_volume(comp["builddir"], 1)
175
+
176
+ rt.start()
177
+
178
+ ugraph.execute(graph, args.tasks, args.verbose, not args.no_color)
179
+
180
+
181
+ def _filter(name, graph, args):
182
+ components = []
183
+ pruned = {}
184
+
185
+ for arg in args:
186
+ try:
187
+ conf, comp = arg.split(".", maxsplit=1)
188
+ if conf == name:
189
+ components.append(comp)
190
+ except ValueError:
191
+ components.append(arg)
192
+
193
+ if len(components) == 0:
194
+ return graph
195
+
196
+ for c in components:
197
+ if c not in graph:
198
+ raise Exception(f"Bad filter: {c} not a component of {name}")
199
+ pruned[c] = []
200
+
201
+ return pruned