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

An MVP CLI for urlshortener V1 #10

Open
2 of 8 tasks
Byron opened this issue Aug 20, 2019 · 1 comment
Open
2 of 8 tasks

An MVP CLI for urlshortener V1 #10

Byron opened this issue Aug 20, 2019 · 1 comment
Assignees

Comments

@Byron
Copy link
Contributor

Byron commented Aug 20, 2019

This includes a handmade prototype with the following capabilities

  • make prototype that compiles
  • refactor into a state that is better than before
  • use a public method
  • figure out a way to differentiate api-key, oaut2 token, and installed application flows
  • be able to login
  • use a private method successfully (like the summary)

For the prototype code generation

  • generate an MVP of the CLI above with syn/quote
  • a way to generate CLI documentation

As a basic requirement: the CLI should be at least as powerful as the ones in OP, and on a similar level of quality.

This is the current epic, there will be many related tasks.

Unanswered questions

  • how debugging should be facilitated. We don't support the 'TeeConnector' for spying on all http traffic anymore.
@Byron Byron self-assigned this Aug 20, 2019
@Byron
Copy link
Contributor Author

Byron commented Sep 3, 2019

Quick POC to assert we can now construct the whole clap App on the heap right away, which allows to drop the ugly workaround previously employed:

//# default-boxed = "*"
use default_boxed::DefaultBoxed;
use clap;

// #[derive(DefaultBoxed)]
struct Foo<'a, 'b> {
    e: clap::App<'a, 'b>
}


impl<'a, 'b> Default for Foo<'a, 'b> {
    fn default() -> Foo<'a, 'b> {
        Foo {
            e: clap::App::new("foo"),
        }
    }
}


fn main() {
    // std::mem::drop(Foo::default());
    let foo = Foo::default_boxed();
    foo.e.get_matches();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant