Skip to content

Comments

fix(forge): Ignore file access events to prevent rebuild loop#10763

Merged
zerosnacks merged 1 commit intofoundry-rs:masterfrom
joeblogg801:fix-open-notify
Jun 12, 2025
Merged

fix(forge): Ignore file access events to prevent rebuild loop#10763
zerosnacks merged 1 commit intofoundry-rs:masterfrom
joeblogg801:fix-open-notify

Conversation

@joeblogg801
Copy link
Contributor

Fixes #10762

Motivation

This fixes an issue introduced by notify-rs/notify#612, where OPEN events are now reported on Linux. As a result, file access (e.g., reading a file) triggers spurious change notifications, causing the compilation process to restart repeatedly.

Solution

To resolve this, we explicitly ignore Access(Open) events during event processing.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

This fixes an issue introduced by notify-rs/notify#612,
where `OPEN` events are now reported on Linux. As a result, file access
(e.g., reading a file) triggers spurious change notifications, causing the
compilation process to restart repeatedly.

To resolve this, we explicitly filter out `OPEN` (access) events during
event processing.
Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks @joeblogg801 the implementation looks good and confirming it works as expected

Checked together w/ @grandizzy

@zerosnacks zerosnacks merged commit 558d7d5 into foundry-rs:master Jun 12, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Jun 12, 2025
@joeblogg801 joeblogg801 deleted the fix-open-notify branch June 12, 2025 13:13
@joeblogg801
Copy link
Contributor Author

Thanks! Happy to contribute 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Infinite rebuild loop on Linux due to Access(Open) events from notify in the build watch mode

2 participants