Remove C tab
This CL removes the C bindings tab since we have ended C bindings
support. Also removes "tables.c" from the C++ tab since the new C++
bindings do not use coding tables, only HLCPP does.
Bug: 95833
Change-Id: I95a86cbc383a6c7b2519bce95e0dad0abecf689a
Reviewed-on: https://fuchsia-review.googlesource.com/c/fidlbolt/+/803307
Reviewed-by: Yifei Teng <yifeit@google.com>
diff --git a/backend/server.go b/backend/server.go
index 074e66d..9204527 100644
--- a/backend/server.go
+++ b/backend/server.go
@@ -203,7 +203,6 @@
const (
Bytes mode = "bytes"
BytesPlus mode = "bytes+"
- C mode = "c"
CPP mode = "cpp"
Dart mode = "dart"
Diff mode = "diff"
@@ -227,7 +226,6 @@
FIDL: {
FIDL: {},
JSON: {},
- C: {},
CPP: {},
HLCPP: {},
Rust: {},
@@ -304,16 +302,9 @@
"driver/wire_messaging.cc", "driver/natural_messaging.h",
"driver/natural_messaging.cc", "type_conversions.h",
"type_conversions.cc":
- case "tables":
default:
return fmt.Errorf("invalid C++ file option: %q", r.Options.File)
}
- case C:
- switch r.Options.File {
- case "header", "client", "server", "tables":
- default:
- return fmt.Errorf("invalid C file option: %q", r.Options.File)
- }
case Dart:
switch r.Options.File {
case "library", "test":
@@ -427,7 +418,7 @@
}
switch r.OutputMode {
- case C, CPP, HLCPP:
+ case HLCPP:
if r.Options.File == "tables" {
return fidlc("--tables", "/dev/stdout")
}
@@ -482,17 +473,6 @@
default:
return response{}, fmt.Errorf("invalid file: %q", r.Options.File)
}
- case C:
- switch r.Options.File {
- case "header":
- return fidlc("--deprecated-fuchsia-only-c-header", "/dev/stdout")
- case "client":
- return fidlc("--deprecated-fuchsia-only-c-client", "/dev/stdout")
- case "server":
- return fidlc("--deprecated-fuchsia-only-c-server", "/dev/stdout")
- default:
- return response{}, fmt.Errorf("invalid file: %q", r.Options.File)
- }
}
jsonIR := fidl + ".json"
diff --git a/frontend/src/elm/Mode.elm b/frontend/src/elm/Mode.elm
index 8d0210f..a008316 100644
--- a/frontend/src/elm/Mode.elm
+++ b/frontend/src/elm/Mode.elm
@@ -56,7 +56,6 @@
type Mode
= Bytes
| BytesPlus
- | C
| Cpp
| Dart
| Diff
@@ -77,7 +76,7 @@
outputs input =
case input of
Fidl ->
- [ Fidl, Json, C, Cpp, Hlcpp, Rust, Go, Dart ]
+ [ Fidl, Json, Cpp, Hlcpp, Rust, Go, Dart ]
FidlText ->
-- TODO(mkember): Add BytesPlus once implemented.
@@ -244,22 +243,6 @@
, ( "driver/natural_messaging.cc", "driver/natural_messaging.cc" )
, ( "type_conversions.h", "type_conversions.h" )
, ( "type_conversions.cc", "type_conversions.cc" )
-
- -- TODO(fxbug.dev/93781): For consistency, we're showing
- -- "tables.c" in the dropdown, but still passing the
- -- identifier "tables" to the backend like all other
- -- bindings. Although coding tables aren't produced by
- -- fidlgen_cpp, they're used by its bindings, and the
- -- idea was to include all related files.
- , ( "tables", "tables.c" )
- ]
- ]
-
- ( Fidl, C ) ->
- [ files ( "header", "Header" )
- [ ( "client", "Client" )
- , ( "server", "Server" )
- , ( "tables", "Tables" )
]
]
@@ -370,9 +353,6 @@
BytesPlus ->
"bytes+"
- C ->
- "c"
-
Cpp ->
"cpp"
@@ -410,9 +390,6 @@
"bytes+" ->
Just BytesPlus
- "c" ->
- Just C
-
"cpp" ->
Just Cpp
@@ -458,9 +435,6 @@
BytesPlus ->
"Bytes+"
- C ->
- "C"
-
Cpp ->
"C++"
diff --git a/frontend/src/mode.ts b/frontend/src/mode.ts
index 428e897..d4ac110 100644
--- a/frontend/src/mode.ts
+++ b/frontend/src/mode.ts
@@ -8,7 +8,6 @@
export type Mode =
| 'bytes+'
| 'bytes'
- | 'c'
| 'cpp'
| 'dart'
| 'diff'
@@ -53,7 +52,6 @@
const ACE_MODES: Record<Mode, string> = {
'bytes+': 'text',
bytes: 'bytes',
- c: 'c_cpp',
cpp: 'c_cpp',
dart: 'dart',
diff: 'text',