-
Notifications
You must be signed in to change notification settings - Fork 19
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
Incorrect Parameters For Command With Same Name As Job #191
Comments
Thanks for reporting this! Would it be possible for you to provide a YAML config file that triggers this issue? |
This is the config where the issue was noticed with the VS Code extension: https://github.com/electron/forge/blob/main/.circleci/config.yml |
I just ran into this using the aws-s3 orb. Are there any updates on this? I have a workaround but would be nice to utilize the orb fully. |
Still an issue it seems. This wouldn't be so problematic if there were a way to suppress errors/warning per line. Put an "idea" in here for that. Let me know if it should rather be an issue here, tho. Would love to get my config file "problem" free. It's the OCD.. :D |
If a command and a job have the same name, the language server will use the parameters from the job, for the command's parameters, leading to incorrect errors.
It looks like the root cause are these chunks of code, where the parameters are looked up for a command first, then a job, so if they have the same name, it falls through and returns the parameters for the job. It looks like that code needs to have a better understanding of what type the entity actually is, rather than just looking it up by name, since the name can refer to either a command or a job.
Warning
This issue exists in at least two spots,
GetDefinedParams
andGetOrbDefinedParams
, but I did not exhaustively check for others. I'm seeing this error specifically with commands from an orb.circleci-yaml-language-server/pkg/parser/yamlparser.go
Lines 561 to 577 in 1818ea5
circleci-yaml-language-server/pkg/parser/yamlparser.go
Lines 579 to 600 in 1818ea5
The text was updated successfully, but these errors were encountered: