[ 
https://issues.apache.org/jira/browse/AVRO-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Skraba updated AVRO-2649:
------------------------------
    Description: 
The following command line works:

{code}
$ avrotool compile -string -bigDecimal schema 
./lang/java/tools/src/test/compiler/input/fieldtest.avsc /tmp/output
Input files to compile:
  ./lang/java/tools/src/test/compiler/input/fieldtest.avsc
{code}

Switching the first two flags causes an error:

{code}
$ avrotool compile -bigDecimal -string schema 
./lang/java/tools/src/test/compiler/input/fieldtest.avsc /tmp/output
Expected "schema" or "protocol".
{code}

There's really no need to enforce a command line option order, especially for 
flags, and it's not user friendly.  Most CLI tools don't.  There's several good 
command line parsers to help.

  was:
The following command line works:

{code}
$ avrotool compile -string -bigDecimal schema 
./lang/java/tools/src/test/compiler/input/fieldtest.avsc /tmp/output
Input files to compile:
  ./lang/java/tools/src/test/compiler/input/fieldtest.avsc
{code}

Switching the first two flags causes an error:

{code}
rskraba@tlnd-rskraba:~/working/github/avro$ avrotool compile -bigDecimal 
-string schema ./lang/java/tools/src/test/compiler/input/fieldtest.avsc 
/tmp/output
Expected "schema" or "protocol".
{code}

There's really no need to enforce a command line option order, especially for 
flags, and it's not user friendly.  Most CLI tools don't.  There's several good 
command line parsers to help.

        Summary: [Java] Argument order enforced in avro-tools cli.  (was: 
[Java] Argument order counts in avro-tools cli.)

> [Java] Argument order enforced in avro-tools cli.
> -------------------------------------------------
>
>                 Key: AVRO-2649
>                 URL: https://issues.apache.org/jira/browse/AVRO-2649
>             Project: Apache Avro
>          Issue Type: Improvement
>    Affects Versions: 1.9.1
>            Reporter: Ryan Skraba
>            Priority: Minor
>
> The following command line works:
> {code}
> $ avrotool compile -string -bigDecimal schema 
> ./lang/java/tools/src/test/compiler/input/fieldtest.avsc /tmp/output
> Input files to compile:
>   ./lang/java/tools/src/test/compiler/input/fieldtest.avsc
> {code}
> Switching the first two flags causes an error:
> {code}
> $ avrotool compile -bigDecimal -string schema 
> ./lang/java/tools/src/test/compiler/input/fieldtest.avsc /tmp/output
> Expected "schema" or "protocol".
> {code}
> There's really no need to enforce a command line option order, especially for 
> flags, and it's not user friendly.  Most CLI tools don't.  There's several 
> good command line parsers to help.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to