Skip to content

[BUG] The same resource files are loaded multiple times in robotcode language server in analysis #461

@petrieh

Description

@petrieh

Describe the bug
If the same resource is imported from multiple test suites in different directories with relative path, then the key of the path is different although the resource is the same. This causes resources to created from TextDocument each time. This is causing significant performance issue in case of large suites containing large number of this type of imports in the settings sections.

Steps To Reproduce
Steps to reproduce the behavior:
Enable all debug logs in analysis. Create two test suites with relative import Resource setting which point to the same file. From debug logs can be seen 'Load resource ../resources/resource.robot from source /tests/a/../resources/resource.robot' and 'Load resource ../resources/resource.robot from source /tests/b/../resources/resource.robot'.

Expected behavior
Should get the resources from resources map in these relative cases as well.

Desktop (please complete the following information):

  • VS Code Version 1.100.3
  • RobotCode Version: 1.2.0
  • OS: Linux
  • Python Version: 3.9.21
  • RobotFramework Version: 7.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions