Skip to content

[DOCS]: Match the foryc --help output with the compile options table #3402

@ayush00git

Description

@ayush00git

Search before asking

  • I had searched in the issues and found no similar issues.

Version

Latest

Component(s)

Doc

Minimal reproduce step

Type foryc --help in your terminal, and see the result -

usage: foryc [-h] [--scan-generated] [--lang LANG] [--output OUTPUT] [--package PACKAGE] [-I PATH] [--java_out DST_DIR] [--python_out DST_DIR] [--cpp_out DST_DIR]
             [--go_out DST_DIR] [--rust_out DST_DIR] [--go_nested_type_style {camelcase,underscore}] [--emit-fdl] [--emit-fdl-path EMIT_FDL_PATH] [--root ROOT] [--relative]
             [--delete | --dry-run] [--grpc]
             [FILE ...]

Fory IDL compiler

positional arguments:
  FILE                  IDL files to compile

options:
  -h, --help            show this help message and exit
  --scan-generated      Scan for generated files under the current directory
  --lang LANG           Comma-separated list of target languages (java,python,cpp,rust,go). Default: all
  --output, -o OUTPUT   Output directory. Default: ./generated
  --package PACKAGE     Override package name from FDL file
  -I, --proto_path, --import_path PATH
                        Add a directory to the import search path. Can be specified multiple times.
  --java_out DST_DIR    Generate Java code in DST_DIR
  --python_out DST_DIR  Generate Python code in DST_DIR
  --cpp_out DST_DIR     Generate C++ code in DST_DIR
  --go_out DST_DIR      Generate Go code in DST_DIR
  --rust_out DST_DIR    Generate Rust code in DST_DIR
  --go_nested_type_style {camelcase,underscore}
                        Go nested type naming style: camelcase or underscore (default)
  --emit-fdl            Emit translated FDL (for non-FDL inputs) for debugging
  --emit-fdl-path EMIT_FDL_PATH
                        Write translated FDL to this path (file or directory)
  --root ROOT           Root directory to scan (default: current directory)
  --relative            Print paths relative to the scan root
  --delete              Delete all scanned generated files
  --dry-run             Scan and print without deleting files
  --grpc                Generate gRPC service code (stubs, serialization traits, etc.)

What did you expect to see?

  • the default value of the --go_nested_type_style is underscore but the docs mentions it as from schema/default
  • Also the definitions of the --emit-fdl and --emit-fld-path in the compile options table does not matches with the foryc --help command's output.

Anything Else?

  • The default value of --go_nested_type_style should be set to underscore in the docs.
  • --grpc flag was introduced in the PR feat(compiler): add gRPC flags to fory compiler #3361 but not added in the compile options table.
  • The definitions of --emit-fdl and --emit-fdl-path should sync with the command's output.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions