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

Arg counts, types not checked on custom commands #26

Open
fmoo opened this issue Aug 16, 2022 · 1 comment
Open

Arg counts, types not checked on custom commands #26

fmoo opened this issue Aug 16, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fmoo
Copy link

fmoo commented Aug 16, 2022

What is the current behavior?

When using a <> in a .yarn file, calling a custom command with the incorrect number or types on command arguments are not indicated as errors on in the Issues tab.

Functions behave correctly.

Please provide the steps to reproduce, and if possible a minimal demo of the problem:

  1. Implement a basic custom command that takes one int as an argument, e.g.,
runner.AddCommandHandler<int>("Log", (num) => Debug.Log(num));
  1. Call it in .yarn with no args
  2. Call it in a .yarn with two args
  3. Call it in a .yarn, but pass a string

e.g.,

<<Log>>
<<Log 1 2 3>>
<<Log spam>>

What is the expected behavior?

The above examples should show an issue in the "Issues" tab in vscode.

Number "4" might be trickier, since it's probably ok to pass numbers as unquoted strings for a command that accepts strings.

Please tell us about your environment:

  • Yarn Spinner Version: 2.2
  • Extension Version: 2.2.15
  • Unity Version: 2021.1.18f1

Other information

@fmoo fmoo added the bug Something isn't working label Aug 16, 2022
@fmoo
Copy link
Author

fmoo commented Aug 16, 2022

Also repros on vscode extension v2.2.40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants