Jaseci-Labs / jac-analyzer

The Jaclang Language Extension for VScode is an extension that provides basic Language Server Protocol (LSP) functionalities for the Jaclang programming language.
MIT License
0 stars 3 forks source link

[FIX] Incorect Information from Glob Values from other Files Showing #51

Closed musab-mah-7 closed 2 months ago

musab-mah-7 commented 3 months ago

Fix Hover Information and Semantic Highlighting Bugs in Multiple Jac Files

Overview

This pull request addresses critical bugs affecting hover information and semantic highlighting across multiple Jac files within our system. These issues lead to incorrect hover information displays and inaccurate semantic highlighting due to cross-file data contamination.

Problems Addressed

  1. Hover Information Discrepancies:

    • Issue: Tooltips display information that may belong to similar elements in different Jac files, causing confusion.
    • Impact: Developers face misinformation when interacting with code, impacting productivity and increasing error rates.
  2. Faulty Semantic Highlighting:

    • Issue: Code semantics are highlighted erroneously based on data from unrelated Jac files.
    • Impact: Misleads the visual code analysis and readability, affecting the development process negatively.

Root Cause

The bugs were traced back to improper isolation in the cross-referencing logic of our system's file handling module, where hover data and semantic contexts were mistakenly shared across multiple Jac files.

Changes Made

Expected Outcome

Post-implementation, hover information and semantic highlighting will:

Steps to Test

  1. Open a project with multiple Jac files.
  2. Hover over various elements to check for accurate, file-specific information display.
  3. Check the semantic highlighting for consistency with the actual code semantics of the active Jac file.

Additional Notes

This PR is crucial for maintaining the integrity of the development environment, particularly in projects with extensive Jac file use. Immediate implementation is recommended to mitigate further impacts on productivity.


Reviewer Checklist

chandralegend commented 3 months ago

@musab-mah-7 Please update the description of the PR

chandralegend commented 3 months ago

@musab-mah-7 Fix the tests. Remove windows test in server