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

cli/daemon: support watching embedded files #1667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bn4t
Copy link
Contributor

@bn4t bn4t commented Dec 20, 2024

Regarding #416.

Added a very basic implementation to support watching files embedded using //go:embed.

Might make sense to track go files using watcher events instead of walking the whole project every time. Let me know if you want me to add that.

@encore-cla
Copy link

encore-cla bot commented Dec 20, 2024

All committers have signed the CLA.

@eandre
Copy link
Member

eandre commented Dec 22, 2024

As much as this functionality would be desirable, the solution is not performant enough to read every single file that has a file modification event. I'm afraid it's a bit of a non-starter as is written.

@bn4t bn4t force-pushed the watch-embedded-files branch 2 times, most recently from 2280480 to 533eeaf Compare December 28, 2024 21:42
@bn4t
Copy link
Contributor Author

bn4t commented Dec 28, 2024

@eandre Thanks for the feedback. I added now tracking of embedded files, so that embedding or unembedding a new file doesn't cause a rescan of the whole project directory tree.

What do you think of this implementation?

@bn4t bn4t force-pushed the watch-embedded-files branch from 533eeaf to cfab064 Compare December 28, 2024 21:44
@bn4t bn4t force-pushed the watch-embedded-files branch from cfab064 to e88a572 Compare December 28, 2024 21:45
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