Multiple Keyword Matching Error but only one keyword defined
Hello,
I have project with keywords defined in file outside on the test. So the tree structure is like this for example :
actuators
ntp.robot journalctl.py utils.py ...
tests
mytest.robot
Inside "journalctl" I have keywords that I call inside mytest.robot, the same for utils.py. The keywords from journalctl are in error :
But the keywords are defined only once. And when I went through the keyword, vscode finds one in actuators and one in \actuators :
I don't know where this is defined and why for this file and not for the others.
Thanks Lucie
Versions:
- OS: Windows 10
- Robot Framework Version: 6.1
- Robot Framework Language Server Version: 1.11.0
- Client Version:VSCode 1.82.2
@lucieb31 seems like we found the same bug https://github.com/robocorp/robotframework-lsp/issues/983
I think I hit the same problem, and I think I'm one step closer to the root cause:
I have a variable {"robot": "variables": {"ROOT": "/home/user/test/"}} passed via the workspace/didChangeConfiguration
Later I refer to this variable in the robot file:
Resource ${ROOT}/resources/my_lib.robot
Note: If you resolve the path, there is a duplicate slash in the path
A keyword "My Keyword" is defined in the my_lib.robot. If the resource is included more than once (can be included indirectly) robot LSP marks this as duplicate. This is most probably a path sanitation issue, as the keyword now can be resolved twice. There is a duplicate _KeyworFoundFromAst object with similar, but not the same source (/home/user/test//resources/my_lib.robot != /home/user/test/resources/my_lib.robot)
A reproducer is attached. test.tar.gz