Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(parser): Make behavior more consistent #3765

Merged
merged 12 commits into from May 27, 2022
Merged

Commits on May 26, 2022

  1. refactor(parser): Consolidate help/version handling

    This is a step towards user-visible actions
    epage committed May 26, 2022
    Copy the full SHA
    8683200 View commit details
    Browse the repository at this point in the history
  2. fix(parser): Pass the intended flag to the action

    Inferred flags can make it hard for a future action to trigger behavior
    off of the selected alias, like we might want to do for negations, so we
    are now translating to the intended arg.
    
    This will also help for debugging.
    epage committed May 26, 2022
    Copy the full SHA
    28cb71c View commit details
    Browse the repository at this point in the history

Commits on May 27, 2022

  1. refactor(parser)!: Consolidate group/occurrence logic

    We were independently starting occurrences and starting value groups.
    Now we do them at the same time.
    
    COMPATIBILITY: This changes us from counting occurrences per positional
    when using `multiple_values` to one occurrence.  This is user visible
    and tests were written against it but it goes against the documentation
    and doesn't quite make sense.
    epage committed May 27, 2022
    Copy the full SHA
    9805fda View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ccc809a View commit details
    Browse the repository at this point in the history
  3. fix(parser): Always use delimiter on defaults/env

    Doesn't make sense to respect how the command line ended
    epage committed May 27, 2022
    Copy the full SHA
    302bf63 View commit details
    Browse the repository at this point in the history
  4. refactor(parser): Be more explicit in default_missing_values

    I wrote these tests expecting to highlight a bug but it turns out things
    were structured just right to not exhibit it.  The fact that the code
    looks like its broken is a problem, so I restructured it (put it first,
    changed the source) so it doesn't look suspicious anymore.
    epage committed May 27, 2022
    Copy the full SHA
    c72f03e View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    e268dbf View commit details
    Browse the repository at this point in the history
  6. fix(parser): Always end on required delimited arg

    Before, if we were in trailing values that aren't delimite, we wouldn't
    respect this flag and end processing of the value, now we do.
    
    This also has a slight perf benefit of us only splitting the value if
    the delimiter is present.  We checked for the delimiter anyways, so
    doing it first removes a slight bit of work.
    
    I also feel this helps clarify the intended behavior and ooches us
    towards a unified code path for actions.
    epage committed May 27, 2022
    Copy the full SHA
    9f46867 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    ac8320d View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    2a409be View commit details
    Browse the repository at this point in the history
  9. refactor(parser): Clarify intent for defaults/envs

    Especially important is not inferring intent from occurrences as
    hopefully that will change with the introduction of actions.
    epage committed May 27, 2022
    Copy the full SHA
    8f16f2e View commit details
    Browse the repository at this point in the history
  10. style: Fix typos

    epage committed May 27, 2022
    Copy the full SHA
    e41a65d View commit details
    Browse the repository at this point in the history