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

Remove the "ignore_for_watch" mechanism #5019

Closed
wants to merge 1 commit into from
Closed

Remove the "ignore_for_watch" mechanism #5019

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 19, 2021

This was an old mechanism to avoid restarting the build every time Dune promotes a file. It is no longer necessary now that we have Fs_cache.

This was an old mechanism to avoid restarting the build every time
Dune promotes a file. It is no longer necessary now that we have
Fs_cache.

Signed-off-by: Jeremie Dimino <[email protected]>
@ghost ghost requested a review from snowleopard October 19, 2021 11:10
@ghost ghost mentioned this pull request Oct 19, 2021
Copy link
Collaborator

@snowleopard snowleopard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I assume you tested that it actually works as expected :)

@ghost
Copy link
Author

ghost commented Oct 19, 2021

I should have :) It seems to work as expected, expect that the status line still changes to "Source file changed". Fixing that.

@ghost
Copy link
Author

ghost commented Oct 19, 2021

After more investigation: we can't remove this hack quite yet. The code that promotes the file tracks the source file via Fs_memo.path_digest, which has two effects:

  • we don't actually do the copy if the source file is the same as the generated one
  • if the user modifies or deletes the source file, Dune immediately recreates it by copying the generated file

As a result, if we remove this hack then we end up restarting the build everytime a file is promoted and its contents changes. With more work, we could still remove this hack and preserve the current behaviour. But this is a bigger change and not high priority, so let's keep the status quo for now.

@ghost ghost closed this Oct 19, 2021
This pull request was closed.
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