jcli icon indicating copy to clipboard operation
jcli copied to clipboard

Full revision of README

Open BradleyChatha opened this issue 3 years ago • 19 comments

With the large refactor, courtesy of @AntonC9018 , the README will need a complete look over to ensure it's still correct, and to also add in any new features that haven't been described yet.

BradleyChatha avatar Feb 26 '22 05:02 BradleyChatha

Yo, I am on the latest non-beta version, 0.24.0, and I cannot find ArgConfig.repeatableName, in which version may I find this as I desperately need it for my compiler (object linking).

deavmi avatar Jan 24 '23 19:01 deavmi

Yo, I am on the latest non-beta version, 0.24.0, and I cannot find ArgConfig.repeatableName, in which version may I find this as I desperately need it for my compiler (object linking).

it's not released under a version, use the master branch, or make a fork and use it as a submodule

AntonC9018 avatar Jan 24 '23 19:01 AntonC9018

@AntonC9018 Is there a way in dub to specify to use whatever the HEAD of the master branch is?

deavmi avatar Jan 24 '23 19:01 deavmi

I mean i could fork it but then I'd need to make it available on dub which is well, seems grifty.

deavmi avatar Jan 24 '23 19:01 deavmi

Is there no motivation to get an early beta out perhaps for these new features, I mean clearly marked as a beta such that users like me can use it but stable-enjoyers can stray away from it. Would help out a lot :heart:

deavmi avatar Jan 24 '23 19:01 deavmi

Hey, there is in fact a beta out on dub :)

https://code.dlang.org/packages/jcli - 0.25.0-beta.1

If you ever need to use a branch inside dub, you can use "~BRANCH_NAME" as the version string.

BradleyChatha avatar Jan 24 '23 19:01 BradleyChatha

Thanks a tonne @BradleyChatha !

deavmi avatar Jan 24 '23 20:01 deavmi

Has the template instantiation changed quite a bit?

image

deavmi avatar Jan 24 '23 20:01 deavmi

Ah yeah, 0.25.0-beta.1 is a large rewrite.

Sorry for the annoyances, I can go try and get a version tagged in the older code that has the feature implemented for you though, will update you shortly.

BradleyChatha avatar Jan 25 '23 07:01 BradleyChatha

... Although I think I'm attempting to fix the wrong problem here.

The actual problem is I really need to get the README fully up to date to address the new changes. For now if you look at this example, it should help you get to where you're going: https://github.com/BradleyChatha/jcli/tree/master/new_examples/across_modules

🤕 Again, I know this is a subpar experience, so I would just like to apologise.

BradleyChatha avatar Jan 25 '23 07:01 BradleyChatha

No problem, I understand :). I will take a look at the code example you have posted and if I can get that working, else a tag that supports the feature I am looking for and the same templatised constructor would be the way to go :)

deavmi avatar Jan 25 '23 12:01 deavmi

Ah yeah, 0.25.0-beta.1 is a large rewrite.

Sorry for the annoyances, I can go try and get a version tagged in the older code that has the feature implemented for you though, will update you shortly.

This would be great, thanks - let me know what the tag is if you get this up.

I will eventually upgrade but trying to stay with things intact for this year atleast.

deavmi avatar Jan 25 '23 12:01 deavmi

I'm struggling with the example you posted above, I think a tagged version would be best for now @BradleyChatha , later - when the readme is updated - I will be able to transition over

deavmi avatar Jan 25 '23 12:01 deavmi

I'm struggling with the example you posted above, I think a tagged version would be best for now @BradleyChatha , later - when the readme is updated - I will be able to transition over

what did you not understand in the examples, you can ask me directly, I'm the one who wrote them

AntonC9018 avatar Jan 25 '23 13:01 AntonC9018

@AntonC9018 I'm struggling to find the symbol matchAndExecuteAcrossModules

deavmi avatar Jan 25 '23 13:01 deavmi

@AntonC9018 I'm struggling to find the symbol matchAndExecuteAcrossModules

https://github.com/BradleyChatha/jcli/blob/master/subprojects/commandgraph/source/jcli/commandgraph/cli.d#L174

AntonC9018 avatar Jan 25 '23 13:01 AntonC9018

So it compiles now, but it would seem as though nothing ever executes now, I just get the usage being displayed constantly:

module commandline.args;

import jcli.commandgraph.cli;

void parseCommandLine(string[] arguments)
{
    /* Create an instance of the JCLI command-line parser */
    // CommandLineInterface!(commandline.commands) commandLineSystem = new CommandLineInterface!(commandline.commands)();

    matchAndExecuteAcrossModules!(commandline.commands)(arguments);

    /* Parse the command-line arguments */
    // commandLineSystem.parseAndExecute(arguments);
}

Output:

tlang NO_PUBLISH_RELEASE

   compile:  Compiles the given file(s)
       lex:  Performs tokenization of the given file(s)
syntaxcheck:  Check the syntax of the program
 typecheck:  Perform typechecking on the program
      help:  Shows the help screen

deavmi avatar Jan 25 '23 13:01 deavmi

So it compiles now, but it would seem as though nothing ever executes now, I just get the usage being displayed constantly:

module commandline.args;

import jcli.commandgraph.cli;

void parseCommandLine(string[] arguments)
{
    /* Create an instance of the JCLI command-line parser */
    // CommandLineInterface!(commandline.commands) commandLineSystem = new CommandLineInterface!(commandline.commands)();

    matchAndExecuteAcrossModules!(commandline.commands)(arguments);

    /* Parse the command-line arguments */
    // commandLineSystem.parseAndExecute(arguments);
}

Output:

tlang NO_PUBLISH_RELEASE

   compile:  Compiles the given file(s)
       lex:  Performs tokenization of the given file(s)
syntaxcheck:  Check the syntax of the program
 typecheck:  Perform typechecking on the program
      help:  Shows the help screen

it doesn't slice off the program name from the argument list, you need to do that manually. Look at how it's done in the example

AntonC9018 avatar Jan 25 '23 13:01 AntonC9018

Oh wow, I am legit stupid :facepalm:

Would be nice if I maybe indexed from 1 onwards, forgot about that :laughing: - just goes to show, 5 years of CS doesn't mean anything .

Thanks for the help lads!

deavmi avatar Jan 26 '23 14:01 deavmi