dotnet / dotnet/command-line-api

Argument Groups

Aperta
#1,986 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.7k
Fork
428
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have an interesting problem I'd like to throw into the mix.

I'm working on choosing a new command line handler implementation for an existing application. This existing application supports (and requires some notion of) nested option sets. The idea here is that the command line tool is used for doing an operation. And that it can be told to do this operation multiple times with different options. For instance, compile file A to file B. But then also compile file C to D. And E to F. At the same time. With overlapping global options but also independent group options.

The usage might look like this: ikvmc.exe -assembly:out.dll -baseaddress 0x00000000 inputfile.jar -reference C:\Foo\Bar.dll

But the user might want to compile multiple JARs into a single assembly:

ikvmc.exe -assembly:out.dll -baseaddress 0x00000000 inputfile1.jar inputfile2.jar -reference C:\Foo\Bar.dll

And the grouping: the user might want to compile multiple JARs into multiple assemblies.

ikvmc.exe -reference c:\foo\bar.dll { -assembly:out1.dll -baseaddress 0x00000000 inputfile1.jar } { -assembly:out2.dll -baseaddress 0x00000000 inputfile2.jar }

See?

The idea here is options can be made global (-reference), but other options can be nested into levels. A pattern like this is required for the tool, as various interesting operations can be done to actually tie the independant operations together such as putting -assembly at the top level, etc).

I don't really expect System.CommandLine to support something like this out of the box. But it would be interesting to get ideas about whether I can make it accomplish this with some custom code.

For anybody familiar, GStreamer has a similar notion.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

La issue non indica file, test o punti di ingresso da esaminare. Inizia rivedendo l’architettura esistente per l’analisi della riga di comando e gli esempi di invocazioni annidate nel report; per considerare il lavoro completato servirebbero un approccio deciso e criteri di accettazione chiari per le opzioni globali e più operazioni raggruppate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.