Currently the ysls can know if an action (command or function) has some sort of error via the containsErrors key which is nice but it has a slightly weird behaviour around situations where that action is then attempted to be used in yarn.
These invalid actions are stuck in a weird limbo state where Yarn Spinner knows some stuff about it but not enough to diagnose or fix the issues with it.
As it currently stands you get told in the yarn that the error is an unknown command or unable to determine expression type when it would be better to let us know that the action is known but it won't work if you try and use it.
And because the action is in this weird limbo state the jump to definition doesn't work so the area where you'd see the issue and potentially fix it is disconnected.
Related to this though if you attempt to call a broken function in an expression it appears in the list of available expressions despite the project knowing this won't work.
I think the following changes should happen:
- Compiler emits a new warning for actions it knows about that have issues
- Calls to these invalid actions should appear struck through similar to deprecated methods in other programming languages
- Enable normally hover and jump-to-definition info on the invalid actions
Currently the ysls can know if an action (command or function) has some sort of error via the
containsErrorskey which is nice but it has a slightly weird behaviour around situations where that action is then attempted to be used in yarn.These invalid actions are stuck in a weird limbo state where Yarn Spinner knows some stuff about it but not enough to diagnose or fix the issues with it.
As it currently stands you get told in the yarn that the error is an unknown command or unable to determine expression type when it would be better to let us know that the action is known but it won't work if you try and use it.
And because the action is in this weird limbo state the jump to definition doesn't work so the area where you'd see the issue and potentially fix it is disconnected.
Related to this though if you attempt to call a broken function in an expression it appears in the list of available expressions despite the project knowing this won't work.
I think the following changes should happen: