facebook / buck2

Build system, successor to Buck

Home Page:https://buck2.build/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`expand-external-cell` fails when using inotify watcher

thoughtpolice opened this issue · comments

Out of curiosity, I decided to try using expand-external-cell since I wanted to apply a patch to my prelude. However, it panicked due to some inotify error I couldn't understand.

[cells]
root = .
prelude = buck/prelude
none = none

[external_cells]
prelude = bundled

[cell_aliases]
config = prelude
buck = none
fbcode = none
fbsource = none

[parser]
target_platform_detector_spec = target:root//...->prelude//platforms:default

Results in:

austin@GANON:~/tmp/buck2-extern-cells$ ~/tmp/buck2-x86_64-unknown-linux-musl expand-external-cell prelude
Could not connect to buck2 daemon (buck2 daemon is not running), starting a new one...
Connected to new buck2 daemon.
thread 'notify-rs inotify loop' panicked at app/buck2_file_watcher/src/notify.rs:123:18:
unexpected cell name mismatch
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Build ID: 119bcc14-0f73-4ac4-84bd-43e9e715687e
Jobs completed: 2. Time elapsed: 0.1s.
Command failed: Buck daemon event bus encountered an error, the root cause (if available) is displayed above this message.

Caused by:
    0: status: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", details: [], metadata: MetadataMap { headers: {} }
    1: status: Unknown, message: "h2 protocol error: error reading a body from connection: stream closed because of a broken pipe", details: [], metadata: MetadataMap { headers: {} }
    2: error reading a body from connection: stream closed because of a broken pipe
    3: stream closed because of a broken pipe
[ble: exit 1]

This is reliable and consistent. Because of this failure, extracting the source code fails too, so it leaves the working directory in a bad state.

Note: this command works though when setting buck2.file_watcher = watchman, so that's a workaround for now.

Oops, I had to fix this for watchman and forgot to apply the same patch to notify. Change is landing and should hit master in a couple hours

I'll let you verify that this is fixed, but should be ok now I think

Yes, looks good to me, thanks!