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

CLI Controller #60

Closed
wants to merge 26 commits into from
Closed

CLI Controller #60

wants to merge 26 commits into from

Conversation

yashlala
Copy link
Contributor

Addresses issue #7.

We've included "yargs" as an additional import here.
Update package.json and package-lock.json accordingly once Rohan's
changes are finished.
We ended up with a duplicate package.json file.
In the process, this seems to have updated/deleted many other
dependencies. I'm not entirely sure how npm package management works, so
there's a possibility something else has changed here.
- Run prettify on the code.
- Change yargs to typescript-style import.
This was linked to issues Feb 12, 2021
@Rohanator9000 Rohanator9000 changed the title [DRAFT] Initiate job Initiate job Feb 19, 2021
@rvighne rvighne removed a link to an issue Feb 19, 2021
4 tasks
@Rohanator9000 Rohanator9000 self-assigned this Feb 22, 2021
@yashlala yashlala changed the title Initiate job CLI Controller Feb 26, 2021
Non-CLI code shouldn't have been here to begin with, so I'm moving
the Makefile-trace code off to a new branch.

Ideally, I'd just git revert, but the relevant commits touch many
unrelated files.

We should be ready to merge in this code now.
@yashlala yashlala marked this pull request as ready for review February 26, 2021 20:14
@yashlala yashlala requested review from alexzma, rvighne and Rohanator9000 and removed request for alexzma February 26, 2021 20:14
@yashlala
Copy link
Contributor Author

I'm a bit confused -- npm test:local works just fine on this branch, all tests pass, and ESlint doesn't complain. The functionality is there.
However, it doesn't compile when we try to merge to master, failing with this err message:

> tsc

src/Controller/CommandLineController.ts:17:20 - error TS2349: This expression is not callable.

  Type '{ default: Argv<{}>; alias<K1 extends never, K2 extends string>(shortName: K1, longName: K2 | readonly K2[]): Argv<{ [key in K2]: {}[K1]; }>; alias<K1 extends never, K2 extends string>(shortName: K2, longName: K1 | readonly K1[]): Argv<...>; alias(shortName: string | readonly string[], longName: string | readonly st...' has no call signatures.

17  const yargsArgv = yargs(argv.slice(2))

                      ~~~~~

  src/Controller/CommandLineController.ts:1:1

    1 import * as yargs from 'yargs'

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.

I'm changing around the imports as per the error message, but can't seem to get it to compile in both this branch and in master. Continuing to work on it.

@yashlala
Copy link
Contributor Author

OK, I copied all of my code to a fresh branch based off master and it seems to work. This branch probably contained some unrelated config change that was causing the error.
Closing; will resubmit PR with new branch.

@yashlala yashlala closed this Feb 26, 2021
@yashlala yashlala deleted the initiate-job branch February 26, 2021 21:00
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

Successfully merging this pull request may close these issues.

Command line user input Interface
2 participants