robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
186 stars 15 forks source link

[ENHANCEMENT] Improved Handling of Failed Library and Variable Imports #338

Open d-biehl opened 1 month ago

d-biehl commented 1 month ago

To enhance the robustness of Robot Framework’s import mechanism, we propose improvements for handling failed library and variable imports. The key improvements are as follows:

  1. Enhanced Failure Detection and Response:

    • Upon an import failure, attempt to analyze the root cause (e.g., missing files, incorrect paths, or network issues for remote libraries).
    • Provide more descriptive error messages or suggest potential resolutions based on the detected issue.
  2. Intelligent Retry Mechanism:

    • Avoid re-attempting failed imports during the same execution if the library meets certain conditions:
      • If it is a dynamic library (one that depends on runtime conditions).
      • If the failure is due to a timeout (e.g., network-related issues).
  3. Quickfix Option for failed imports:

    • Introduce a quickfix mechanism to allow users to update and retry the import of only the affected library.
    • To add a library to a permanent cache