Commit bc01887
authored
Consolidate
Summary: Consolidate `all_scripts_test.go` to use a single CGO target to
fix duplicate symbol errors introduced by rules_go v0.58.1
bazel-contrib/rules_go#4438, included in
`rules_go` v0.58.1, causes certain statically linked CGO binaries to
fail with duplicate symbol errors. This occurs when a binary depends on
more than one CGO library that transitively depends on a common set of
object files.
`all_scripts_test.go` previously depended on two CGO targets:
- `//src/carnot/planner`
- `//src/e2e_test/vizier/planner/dump_schemas/godumpschemas`
This PR solves this issue by removing the
src/e2e_test/vizier/planner/dump_schemas/godumpschemas CGO library and
instead generate the protobuf export directly in C++, loading it in the
main application. This approach mirrors the existing pattern used in
[src/vizier/funcs](https://github.com/pixie-io/pixie/blob/a6349a90b1e4b30f0bb13872ad03dff83a53f363/src/vizier/funcs/BUILD.bazel#L50-L66).
**Why not fix `rules_go`?**
The `rules_go` change that causes the issue explains that it doesn't
include the necessary deduplication logic to avoid these duplicate
symbol errors
(bazel-contrib/rules_go#4438 (comment)).
This tradeoff was [deemed
acceptable](bazel-contrib/rules_go#4438 (comment))
since it solved the c++ initialization problem with minimal complexity.
Relevant Issues: N/A
Type of change: /kind cleanup
Test Plan: Build should pass
Signed-off-by: Dom Del Nano <[email protected]>all_scripts_test.go to use a single CGO target to fix duplicate symbol errors introduced by rules_go v0.58.1 (#2311)1 parent a6349a9 commit bc01887
File tree
9 files changed
+307
-153
lines changed- src/e2e_test/vizier/planner
- dump_schemas
- godumpschemas
- schemas
9 files changed
+307
-153
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
28 | 25 | | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
This file was deleted.
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
45 | | - | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
0 commit comments