Skip to content

Deleting a sketch tab that declares a function used in other tabs doesn't report errors. #238

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

Closed
silvanocerza opened this issue Mar 18, 2021 · 3 comments
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: language server Related to the Arduino Language Server type: imperfection Perceived defect in any part of project

Comments

@silvanocerza
Copy link
Contributor

Describe the bug

Deleting a sketch tab that declares a function used in other tabs doesn't report errors.

To Reproduce

  1. Create a new sketch
  2. Save it
  3. Select any board
  4. Create a new tab named tab.ino
  5. In the tab.ino declare a function void foo() {}
  6. Save tab.ino
  7. Call foo() inside loop() in the main sketch file
  8. From the file explorer delete tab.ino
  9. Verify the foo() call inside loop() is not underlined as error
  10. Type foo inside loop() and verify the foo() function is shown in the autocomplete windows

Expected behavior
I'd expect foo() to be underlined as error after tab.ino is deleted and not to be shown in the autocomplete window anymore.

Desktop (please complete the following information):

  • OS: Linux
  • Version: 2.0.0-beta.4-nightly.20210318
  • Date: 2021-03-18T03:10:26.441Z
  • CLI Version: 0.17.0 alpha [ab587583]

Additional context
None.

@ubidefeo
Copy link

Well spotted, @silvanocerza
This is very likely because the files it is analysing are still the temporarily built ones.
This means a rebuild is required at deletion of a file/tab

@ubidefeo ubidefeo added the priority: high Resolution is a high priority label Mar 19, 2021
@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added type: imperfection Perceived defect in any part of project topic: language server Related to the Arduino Language Server labels Sep 22, 2021
@rsora rsora added criticality: high Of high impact and removed priority: high Resolution is a high priority labels Nov 2, 2021
@per1234
Copy link
Contributor

per1234 commented Nov 25, 2021

  1. From the file explorer delete tab.ino

The bug also occurs when you use the primary UI to delete tab.ino (click the downward pointing triangle button on the right side of the tab bar, then "Delete").

@per1234
Copy link
Contributor

per1234 commented Mar 31, 2022

Closing as fixed by arduino/arduino-language-server@3b7271a
Thanks Cristian!

image

@per1234 per1234 closed this as completed Mar 31, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact topic: language server Related to the Arduino Language Server type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

6 participants