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

If a rsc file changes while the checker is running it's changes are not detected properly #2118

Open
DavyLandman opened this issue Jan 8, 2025 · 0 comments
Assignees

Comments

@DavyLandman
Copy link
Member

DavyLandman commented Jan 8, 2025

Timeline for the "race":

  • timestamp 101: VS Code saves file A.rsc
  • timestamp 102: rascal-core request modification timestamp of A.rsc and gets stamp 101.
  • timestamp 103: rascal-core reads the modification timestamp of $A.tpl and gets stamp 90.
  • timestamp 104: rascal-core reads contents of A.rsc and starts the typecheck.
  • timestamp 110: A.rsc is modified outside of VS Code (it's a bit harder to trigger this in VS Code itself)
  • timestamp 120: rascal-core is done with typechecking A.rsc and writes $A.tpl.
  • timestamp 200: rascal-core wants to typecheck B.rsc that imports A.rsc. It determines that A.rsc is modified at 110, and $A.tpl at 120, so it can use the tpl file.

@PaulKlint already mentioned that the original modificiation timestamp is stored in the tpl. And that the most likely fix is to compare the stored timestamp (which would be 101) to the one on disk (110), and then decide after reading the tpl to consider it outdated afterall.

@DavyLandman DavyLandman changed the title If a rsc file changes while the checker is running it's missed. If a rsc file changes while the checker is running it's changes are not detected properly Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants