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

Fix timing issues waiting for scala-cli linking #11

Merged
merged 1 commit into from
May 25, 2024

Conversation

lolgab
Copy link
Collaborator

@lolgab lolgab commented May 25, 2024

Before there were two concurrent proesses

  • one was publishing a browser refresh signal when linking was done
  • one was watching the file-system for changes and checking updating the map of hashes The problem is that sometimes the event for changed file comes after linking has finished, creating an issue

Now linking publishes an event in linkingTopic.
fileWatcher waits reacts to events in linkingTopic by listing all files in the directory, calculating the hash and then publishing an event in refreshTopic which refreshes the browser

Before there were two concurrent proesses
- one was publishing a browser refresh signal when linking was done
- one was watching the file-system for changes and checking updating the map of hashes
The problem is that sometimes the event for changed file comes after linking has finished, creating an issue

Now linking publishes an event in `linkingTopic`.
`fileWatcher` waits reacts to events in `linkingTopic` by listing all files in the directory, calculating the hash and then publishing an event in `refreshTopic` which refreshes the browser
@Quafadas Quafadas merged commit 3a407eb into Quafadas:main May 25, 2024
2 checks passed
@Quafadas
Copy link
Owner

I merged it and played with it a bit, and this is awesome.

🙏

@lolgab lolgab deleted the fix-timing-issue branch May 25, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants