这是indexloc提供的服务,不要输入任何密码
Skip to content

Filewatcher ignore from .gitignore not working #8765

@ndom91

Description

@ndom91

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/gitbutlerapp/gitbutler

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Which canary version will you have in your reproduction?

2.0.7-canary.1

Describe the Bug

A few times a day when trying to spin up my dev tasks (via turbo watch ..) it'll fail to start with the error message "fail to connect to daemon: server is unavailable: channel closed". After running daemon clear and/or daemon restart it usually works again for a while.

I finally noticed that turbo daemon logs will also tail the logs, so I ran this in the background while such an error occured. The error with turbo watch crashign always seems to occur while some Rust code is compiling and will log some output like this:

2024-07-16T12:24:41.025236Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2024-07-16T12:24:54.905223Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2024-07-16T12:24:57.837548Z  INFO turborepo_lib::daemon::server: triggering shutdown
2024-07-16T12:25:02.683079Z  WARN turborepo_lib::package_changes_watcher: changed_files: {AnchoredSystemPathBuf("crates/gitbutler-tauri/Cargo.toml")}
2024-07-16T12:25:02.683116Z  WARN turborepo_lib::package_changes_watcher: changed_packages: Ok(Some({WorkspacePackage { name: Root, path: AnchoredSystemPathBuf("") }}))
2024-07-16T12:25:09.210155Z  WARN turborepo_filewatch: encountered error watching filesystem enumerating recursive watch: IO error for operation on /opt/gitbutler/gitbutler/target/debug/build/atk-sys-9458f4fb2e56870d/rmetaahEQrj: No such file or directory (os error 2)
2024-07-16T12:25:09.231142Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2024-07-16T12:25:40.004386Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2024-07-16T12:25:45.043916Z ERROR turborepo_lib::daemon::server: package changes stream closed: channel closed
2024-07-16T12:25:48.147472Z  INFO turborepo_lib::daemon::server: triggering shutdown
2024-07-16T12:26:49.347045Z  INFO turborepo_lib::daemon::server: triggering shutdown

Notice the turborepo_filewatch warning line about no such file or directory

This is a Tauri project and the target/.. directory is the Rust compile output, so files are often being written and deleted quickly. This directory is already a part of our .gitignore. I also tried adding !target to the inputs array for the dev task. Unfortunately that didn't seem to ignore that directory either.

From what I understand, the directory should be automatically ignored by being in our .gitignore anyway. Am I missing something here? 🤔

Expected Behavior

Turbo watcher doesn't crash on rust compiles.

To Reproduce

  1. Clone https://github.com/gitbutlerapp/gitbutler
  2. Install all pnpm dependencies
  3. Ensure you have rust / Cargo setup
  4. Run pnpm tauri dev in the root of the repository

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't workingneeds: triageNew issues get this label. Remove it after triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions