Repository navigation
[0.4.x] lv-tool: Fix broken --actor argument - #182
Conversation
72f8c9f to
65540a7
Compare
There was a problem hiding this comment.
@hartwork Is moving the plugin availability check before parse_args() runs a good idea on the whole?
There's a chance of a buggy plugin that crashes lv-tool when its info() function is called on loading. When this happens, the user would not be able to access any help options.
On the other hand, it would more reliably produce a working default actor to use.
Sorry to only bring this up now. This escaped my review of the same patch for master.
@kaixiong the good news is that the only plugin that can crash the argument parsing then is lv_gltest where we have control. An alternative could be to leave the actor at empty string initially, and apply defaults only if still unset after argument parsing. Should I demo the latter approach in place, what do you think? |
Yeah let's try that. This would be safer with LV's current way of retrieving metadata by calling an external C/C++ function in the same address space. |
65540a7 to
fe8d449
Compare
@kaixiong pushed |
@kaixiong PS: No worries, I can forward-port this to |
0.4.x backport of pull request #181