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

Implement CLI changes #583

Merged
merged 24 commits into from
Sep 7, 2023
Merged

Implement CLI changes #583

merged 24 commits into from
Sep 7, 2023

Commits on Aug 14, 2023

  1. CLI Changes Sub-PR: New structure and parsing logic (#591)

    * Add env feature to clap and cargo update
    
    * Dead Code: WIP CLI changes
    
    * Dead Code: CLI feature parity
    
    Although see clap-rs/clap#5020
    
    * Note about not (yet) using infer_subcommands
    
    See clap-rs/clap#5021
    
    * Use clap/wrap_help
    
    Although see clap-rs/clap#5022
    
    * WIP: Strip out previous CLI argument parser setup
    
    [skip ci]
    
    * WIP: Normalise arguments for caller
    
    [skip ci]
    
    * Don't check for file-ness in the CLI argument parser
    
    * File and directory canonicalisation for the argument parser
    
    * Expose CLI types so they can be used downstream
    Xophmeister committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    8dac896 View commit details
    Browse the repository at this point in the history
  2. CLI Changes Sub-PR: Documentation (#592)

    * Update CHANGELOG
    
    * Update README
    
    * Update script that checks that the README correlates with --help
    
    * Make README/CLI checking script a bit clearer
    
    * Updated usage with new collation modes
    
    * Documented configuration collation
    
    * Update example call sites to new CLI
    
    * Added a migration guide for the CLI changes to the CHANGELOG
    Xophmeister committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    2588964 View commit details
    Browse the repository at this point in the history
  3. CLI Changes Sub-PR: Update supplementary tools (#594)

    * Update TTY playground to use new interface
    
    * Update pre-commit hook to use new interface
    Xophmeister committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    fb8fc03 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. CLI Changes Sub-PR: Configuration Subcommand (#593)

    * Implement Display for Configuration: pretty-print TOML
    
    * Comment out old code, stub out new interface implementation
    
    * Additional collation mode
    
    * Some light refactoring
    
    * More refactoring...
    
    * Make the config collation independent of a specified config file
    
    As there are several potential sources of configuration, the collation
    mode is relevant whether a invocation-specific configuration file is
    specified, or not. This has the cheery consequence of sidestepping
    the issue described in clap-rs/clap#5020.
    
    * Add useful annotations to the computed TOML output
    
    * Refactor 'revise' collation mode from original
    
    * Remove unnecessary trailing \n from TOML output
    
    * Syntax tweak
    Xophmeister authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    b7303c2 View commit details
    Browse the repository at this point in the history
  2. CLI Changes Sub-PR: TOML merge Collation (#596)

    * Add tests for TOML collation
    
    * Refactor: Update and use (non-differentiating) collation API
    
    * Got `merge` collation working
    
    Includes slight refactoring of Helix's TOML merging function, largely
    for my sake while I was trying to understand it!
    
    * Some sugar for your tea?
    Xophmeister authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    3db6d95 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. CLI Changes Sub-PR: Visualisation subcommand (#597)

    * Note about not using infer_subcommands
    
    * --tolerate-parsing-errors doesn't make sense for visualisation
    
    * Separate out input source types so we can create a unified interface
    
    * Fallback to the given output path if canonicalisation fails
    
    Resolves #588
    
    * We're going to need an InputFile, too
    
    * WIP: InputFile type
    
    * Correct blunder regarding --query
    
    Note that clap doesn't support (--foo [--bar] | --quux) groups very
    cleanly; it was a bit of a hack to get this to work, with the result
    being the error text being a bit off when an illegal combination is
    attempted. I've attempted to compensate for this by making the long help
    text quite explicit.
    
    Also updated clap, which contains the fix for clap-rs/clap#5022
    
    * Missed change to README
    
    * Add note RE clap-rs/clap#4707 workaround
    
    * Machinery to unify inputs + downstream use to reimplement visualisation
    
    * Don't flatten-away errors
    
    * Don't open the input file until we need to read from it
    
    * Into InputFrom should be from &AtLeastOneInput
    
    * Add logging
    
    * Moar logging!1!!
    Xophmeister authored Aug 18, 2023
    Configuration menu
    Copy the full SHA
    f978b73 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. CLI Changes Sub-PR: Formatting subcommand (#599)

    * Beginnings of thread-safe language definition caching
    
    * Expose the raw values and implement Display
    
    * Thread-safe cache of language definitions
    
    * WIP: Formatting
    
    Formatting is now functional, but there remain implementation details to
    sort out. Bufferin, caching and error handling, in particular...
    
    * Add buffered reading and writing
    
    * Make the cache operational, if not suboptimal :(
    
    * Better error handling
    Xophmeister authored Aug 24, 2023
    Configuration menu
    Copy the full SHA
    7bb02bc View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. CLI Changes Sub-PR: Integration tests (#601)

    * topiary fmt tests
    
    * Fix test task in CI workflow
    
    * Try increasing web test timeout to 30s
    
    * Make sure GNU sed is available, even on macOS
    
    * CLI tests for visualisation
    
    * CLI test for configuration output
    Xophmeister authored Aug 25, 2023
    Configuration menu
    Copy the full SHA
    ae9e80d View commit details
    Browse the repository at this point in the history
  2. Expose the logging level via the command line (#607)

    * Expose logging verbosity through CLI flag
    
    * Updated documentation
    Xophmeister authored Aug 25, 2023
    Configuration menu
    Copy the full SHA
    9d8d27f View commit details
    Browse the repository at this point in the history
  3. Fix language definition cache locking (#608)

    * Lock the cache with Tokio's Mutex
    
    * Use the entry API as it's a bit cleaner
    
    * Remove FIXME comment
    
    * Initialise the logger as early as possible
    Xophmeister authored Aug 25, 2023
    Configuration menu
    Copy the full SHA
    d9b4b3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0a278d8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d88566 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Configuration menu
    Copy the full SHA
    2401de2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd253c9 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. Configuration menu
    Copy the full SHA
    29bdebe View commit details
    Browse the repository at this point in the history
  2. s/QueryPath/QuerySource/

    Xophmeister committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    613a243 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c478d5a View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Configuration menu
    Copy the full SHA
    37cbcf9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aae572d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da0f64a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d4563b View commit details
    Browse the repository at this point in the history
  5. Simplify pre-commit-hook definition

    NOTE: nixfmt also had its way with the source; hence the unrelated diffs
    Xophmeister committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    21efefb View commit details
    Browse the repository at this point in the history
  6. Minor tweak to CI YAML

    Xophmeister committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    5510406 View commit details
    Browse the repository at this point in the history
  7. Revert "Minor tweak to CI YAML"

    This reverts commit 5510406.
    Xophmeister committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    0066227 View commit details
    Browse the repository at this point in the history