Repository navigation
Commit ad76a84
committed
build: patch bazel-orfs synth_partition kept_modules.json parse
The sed-based parser used greedy '.*\\[' / '\\].*' regexes. Slang
elaborates parameterized instances into names that contain '[' and
']' (e.g. 'tcdm_adapter\$mempool_group.gen_tiles[0].i_tile.gen_banks[0]'),
so the greedy match strips most of the JSON and leaves a single
nonsense module name like '0'. nangate45/mempool_group hit this and
its partition action would print 'synthesizing 1 modules: 0' before
failing with 'Module \`0' not found'.
Module names cannot contain '"', so 'grep -oE "\\"[^\"]+\\""' followed
by 'tail -n +2' (skip the "modules" key) is a safe parse without
greedy backtracking. Verified with
'bazelisk build //flow/designs/nangate45/mempool_group:mempool_group_synth',
which now completes.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>1 parent 2039457 commit ad76a84
2 files changed
Lines changed: 21 additions & 0 deletions
File tree
- bazel/bazel-orfs-patches
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments