robotframework-lsp
robotframework-lsp copied to clipboard
Resolving variables from variablefile in settings section does not produce the actual value
Using variables from a variable file in the settings section causes the language server to not resolve the actual variable value but the full text after the equal sign. This will include qutation marks for strings. For example:
ADDRESS = "192.168.0.1"
*** Settings ***
Variables variablefile.py
Library Remote ${ADDRESS} AS RemoteLib
*** Test Cases ***
Lorem ipsum
RemoteLib.Some Keyword
Will cause the following error:
Unresolved library: Remote.
Error generating libspec:
It was not possible to statically resolve the following variables:
Follow-up error:
Getting keyword names from library 'Remote' failed: Calling dynamic method 'get_keyword_names' failed:
Connecting remote server at http://"192.168.0.1" failed: [Errno 11001] getaddrinfo failed
Notice that the quotation marks are included in the url: http://"192.168.0.1"
When you assign the value of another variable it will just use the name that you assign from in the variablefile:
ADDRESS = SOME_OTHER_VARIABLE
then the language server tries to connect to
http://SOME_OTHER_VARIABLE
Versions:
- OS: Windows 10
- Robot Framework Version: 6.1.1
- Robot Framework Language Server Version: 1.11.0
- Client Version: VSCode 1.80.2