[GRIT] Add grit update_resource_ids for structure-preserving update of resource_ids files.
Previously resource_ids requires manual curation. These files contain an implicit "structure" that imposes grouping, dependency (avoids overlap), and parallel streams (allows overlap) of item lists. It turns out that the implicit structure of start IDs can be modeled as a Series-Parallel (SP) Graph. By introducing "META": {"join": #} fields to resource_ids, the graph structure can be made concrete. This CL adds a new GRIT tool that updates resource_ids file while preserving structure. The inputs are: * Existing start ID assignment, whose numerical sequence (along with newly added "join" meta data) stores the SP Graph. * GRD files linked to by resource_ids, which are parsed to find per-tag ID usages. * For GRD files that may be unavailable (e.g., generated ones, or src-internal ones), "META": {"size": {...}} fields is needed to specify bounds for per-tag ID usage. The main output is the resource_ids file with renumbered start IDs. Debug flags are available to access intermediate data. Chrome's main resource_ids file is updated to include the new "META" flags. However, as a precaution, the start IDs are not yet reassigned using the tool -- this will be done as a follow-up. Bug: 979886 Change-Id: If7c0a43f57a1d27950784da7eb8405a6a0567f03 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895736 Commit-Queue: Samuel Huang <huangs@chromium.org> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#715838}
Showing
This diff is collapsed.
Please register or sign in to comment