This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 660
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for docs-rometools canceled.
|
github-actions
bot
added
A-CLI
Area: CLI
A-Diagnostic
Area: errors and diagnostics
A-Project
Area: project configuration and loading
A-Tooling
Area: our own build, development, and release tooling
labels
Apr 24, 2023
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
ematipico
force-pushed
the
feat/bpaf-cli
branch
from
April 27, 2023 12:17
bb35777
to
a43b41f
Compare
ematipico
force-pushed
the
feat/bpaf-cli
branch
from
April 27, 2023 13:26
e482bc2
to
95db693
Compare
ematipico
force-pushed
the
feat/bpaf-cli
branch
from
April 27, 2023 15:28
95db693
to
01e8bbe
Compare
3 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A-CLI
Area: CLI
A-Core
Area: core
A-Diagnostic
Area: errors and diagnostics
A-Project
Area: project configuration and loading
A-Tooling
Area: our own build, development, and release tooling
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors our CLI arguments parsing, using
bpaf
.pico_args
doesn't have all the features we need, and it's very difficult to maintain help commands, documentation, all the arguments we want, etc.Here's a list of the reactors I have done:
derive
feature ofbpaf
;Configuration
struct is now tagged with all thebpaf
directives we need. All the properties that don't need to be exposed as CLI arguments have#[bpaf(hide)]
. Although hiding them is not enough, all the chains of types inside a struct must be handled viabpaf
directives, which means the lint rules must also be hidden. On the other hand, this could allow us to expose them via CLi if we want to;help.rs
file in the newConfiguration
struct;CliOptions
which will contain only options related to the CLI, likecolors
,max-diagnostics
, etc.Command
;Test Plan
Most current tests must stay the same to avoid regressions. The only snapshot tests I have updated are those related to the arguments that fail the parsing. I updated most of the code of tests to adapt them to use
bpaf
.I added new tests for each command's
--help
output. This will help us to understand which arguments we want to show.Changelog
Documentation