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

LS: Deleted files are not disappearing from file/module tree #6698

Open
mkaput opened this issue Nov 19, 2024 · 0 comments
Open

LS: Deleted files are not disappearing from file/module tree #6698

mkaput opened this issue Nov 19, 2024 · 0 comments
Labels
bug Something isn't working ide This issue refers to CairoLS or editor extensions

Comments

@mkaput
Copy link
Member

mkaput commented Nov 19, 2024

Reproduction

Setup

  1. scarb new repro
  2. src/lib.cairo:
    mod fib;
  3. src/fib.cairo:
    pub fn fib(mut n: u32) -> u32 {
        let mut a: u32 = 0;
        a;
    }
  4. Ensure LS state is clean, everything is analyzed etc.
  5. Make an error in src/fib.cairo, for example:
    pub fn fib(mut n: u32) -> u32 {
        let mut a: u32 = ; // syntax error
        a;
    }

Expected behaviour working with another scenario

  1. Comment-out mod fib; in src/lib.cairo
  2. Notice errors from fib.cairo disappear from Problems panel.

Buggy scenario

  1. Keep mod fib; but delete the fib.cairo file entirely via VSCode.
  2. Notice that errors from fib.cairo did not vanish!

Notes

  • I have identified that this is independent of open_files tracking, fib.cairo is properly removed from it.
  • But fib.cairo stays in file/module tree and thus lands in secondary_files set when computing diagnostics. It should disappear from this set upon deletion.
@mkaput mkaput added bug Something isn't working ide This issue refers to CairoLS or editor extensions labels Nov 19, 2024
@mkaput mkaput moved this to Triage in CairoLS Nov 19, 2024
@mkaput mkaput added this to CairoLS Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ide This issue refers to CairoLS or editor extensions
Projects
Status: Backlog
Development

No branches or pull requests

1 participant