-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: add nativescript completion spec #563
Conversation
Overviewdev/ns.ts:Info:Single Scripts:
URLs:
dev/nativescript.ts:Info:dev/tns.ts:Info: |
Hello @pekevski,
Please add a 👍 as a reaction to this comment to show that you read this. |
I will apply the recommendations later tonight. Thanks for the review 🚀 |
Just a note: this will resolve #553 |
Can you add it in the description of the PR, autoclose does not work when written in comments. |
insertValue: "--device {cursor}", | ||
args: { | ||
name: "device id", | ||
// TODO: create a generator of ns device <platform> --available-devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to tackle the generators in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to however my generator script was throwing an exception in the fig logs. I posted about it on the dev-help channel here, it hasn't gotten a response yet so I thought I would tackle it later?
https://discord.com/channels/837809111248535583/839904703214649345/883695652243128330
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QuiiBz I think it is best practice for the completion spec skeleton to be it's own PR. (Not a hard fast rule, especially for smaller specs, but it just makes things easier to review!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running my generator i get the following error. I think i'll just fix it in the future?
About to run the following command cd <dir>/forks/fig-autocomplete && ns devices --json | cat: {options: undefined}
we had an error with the script generator
Error: pty execute promise timed out. Running cmd + c in pseudo terminal just in case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About to run the following command cd <dir>/forks/fig-autocomplete && ns devices --json | cat: {options: undefined} we had an error with the script generator Error: pty execute promise timed out. Running cmd + c in pseudo terminal just in case
Could you try running this command manually (ns devices --json
)? There is a timeout of 10 seconds for each command, so that might be why you see this error in the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timing the command with time ns devices --json
, i get
ns device --json 1.95s user 1.18s system 31% cpu 9.860 total
i think it might just be timing out, is there a way to extend it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not currently possible to extend this default timeout - but looks like the command doesn't exceed 10 seconds, that's strange.
Pushed fixes for the previous set of feedback. |
…on which utilises new cli options
dev/ns.ts
Outdated
/** | ||
* Plaform options used across many commands of the CLI | ||
*/ | ||
const iosGeneralOptions: Fig.Option[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any missing options for ios
? If they are none, we can safely remove this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just a placeholder for future options if they ever got introduced. I can remove it now if you like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just a placeholder for future options if they ever got introduced. I can remove it now if you like
Thanks for the clarification!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this amazing contribution! LGTM 🚀
Huge! Thanks for creating such a simple api 😎 What should we do about the generator timeouts in the meantime? |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature: added the NativeScript completion spec
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
ns, tns and nativescript autocompletion specs have been introduced to Fig
Additional info:
fixes #553