Skip to content
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

File system notifications not handling .yaml (variable) files #710

Closed
rarajabs opened this issue Jul 22, 2022 · 3 comments
Closed

File system notifications not handling .yaml (variable) files #710

rarajabs opened this issue Jul 22, 2022 · 3 comments
Labels
bug Something isn't working robotframework-ls

Comments

@rarajabs
Copy link

Describe the bug
RF Language Server in VS Code is not able to recognise/ interpret built in variables for directories

To Reproduce
Import resources/ variables in settings section on robot file.

Variables           ${CURDIR}${/}variables${/}common variables.yaml

Expected behavior
VS Code will not show any error and interpret those built in variable to correct values

Screenshots
image

image

Versions:

  • OS: Win 10
  • Robot Framework Version: 5.0.1
  • Robot Framework Language Server Version: 0.49.0
  • Client Version: VSCode 1.69.2

Logs
None

@rarajabs rarajabs added bug Something isn't working robotframework-ls labels Jul 22, 2022
@fabioz
Copy link
Collaborator

fabioz commented Jul 25, 2022

Buitin variables are resolved (the only builtin variable not resolved is EXECDIR because it's not stable as it relies on runtime information, so, you need to define it yourself using robot.variables -- see: #263 (comment) to point to the place you want it resolved).

As for CURDIR, it does resolve to the directory containing the current .robot file and it works for me in the example I have here... if you still can't get CURDIR to resolve, please provide a sample project where that happens to make sure we're looking at the same thing.

@fabioz fabioz closed this as completed Jul 25, 2022
@fabioz fabioz reopened this Jul 25, 2022
@fabioz
Copy link
Collaborator

fabioz commented Jul 25, 2022

Actually, I was able to reproduce it with Variables ${CURDIR}${/}variables${/}common variables.yaml (so, it's not directly related to ${CURDIR}, but that particular usage... I'll investigate to know what's causing it).

@fabioz
Copy link
Collaborator

fabioz commented Jul 25, 2022

Humm, I found a caching issue here (so, it's not related to variable resolution) -- clearing the caches using the command: Robot Framework: Clear Caches and restart Robot Framework Language Server makes the issue go away (I'll take a look at fixing the underlying issue).

I can reproduce it by first creating a file with:

*** Settings ***
Variables           ${CURDIR}${/}variables${/}common variables.yaml

and only creating the common variables.yaml file afterwards.

@fabioz fabioz changed the title RF Language Server in VS Code is not able to recognise built in variables File system notifications not handling .yaml (variable) files Jul 26, 2022
@fabioz fabioz closed this as completed in dbab2d9 Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working robotframework-ls
Projects
None yet
Development

No branches or pull requests

2 participants