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

Relay Compiler & Relay LSP broken on latest watchman on homebrew #4874

Open
OllieJennings opened this issue Jan 8, 2025 · 6 comments
Open

Comments

@OllieJennings
Copy link

OllieJennings commented Jan 8, 2025

Hey,

TLDR: do not install the latest version of watchman on homebrew.

The latest version of watchman published on the homebrew repository, is currently not working, and failing out due to various issues that can be seen here: facebook/watchman#1264.

I understand that watchman published on homebrew is a community effort, but sadly that has been stuck in trying to get the latest versions to work. (as seen here: Homebrew/homebrew-core#201422).

I have also tried to to install a previous version of watchman on homebrew, but that fails on building.

I have also tried to build the project from source, but again that has failed due to folly exceptions.

I'm currently running on WSL2 hardware, and have 0 issues with relay until now, and it looks like relay heavily depends on watchman for a smooth developer experience.

Any help would be appreciated, l realise that this is not specifically a relay issue, however this does heavily impact the local development environment.

@captbaritone
Copy link
Contributor

Are you having other issues with Watchman at this point, or does it seem to only be impacting Relay compiler?

@OllieJennings
Copy link
Author

@captbaritone Issues all-together. It seems to be an issue with the latest version that is published to homebrew (which is quite a few versions out of data).

However it looks like the effort to update watchman in brew is facing a bunch of issues

@MTG2000
Copy link

MTG2000 commented Jan 29, 2025

Same case here.

After updating watchman using homebrew on WSL, relay dev stopped working & it keeps throwing this error:

[ERROR] Watchman error: The watchman server reported an error: "watchman::QueryExecError: query failed: synchronization failed: ", while executing command: QueryRequest(
    "query",
    "/home/user/app",
    QueryRequestCommon {
        glob: None,
        glob_noescape: false,
        glob_includedotfiles: false,
        path: Some(
            [
                RecursivePath(
                    "",
                ),
            ],
        ),
       ......
        fields: [
            "name",
            "exists",
        ],
        empty_on_fresh_instance: false,
        omit_changed_files: false,
        fail_if_no_saved_state: false,
        case_sensitive: false,
        sync_timeout: Default,
        settle_period: None,
        settle_timeout: None,
        dedup_results: false,
        lock_timeout: None,
        request_id: None,
        always_include_directories: false,
    },
)

I tried:

  • Uninstalling then reinstalling
  • Uninstalling then re-installing using sudo apt-get watchman (though I know it's not recommended in the docs)
  • Installing an older version of the formula by downloading it & running the command
    HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula ./watchman.rb
    (Would get error Error: Formula installation already attempted: watchman)

but nothing is working so far...

Have you managed to solve the issue somehow or find a workaround?
It's been several hours & nothing seems to work...

@OllieJennings
Copy link
Author

@MTG2000 No sadly l haven't gotten it to work, my "work-around" now is to uninstall watchman and just run the relay-compiler one off anytime l need to generate files.

@sho-pb
Copy link

sho-pb commented Feb 5, 2025

A temporary workaround for this problem is to use a tool that can watch the npm script, such as turborepo.

@MTG2000
Copy link

MTG2000 commented Feb 7, 2025

@sho-pb
We are using turborepo, but what do you mean exactly by watching the npm script?
Could you give me an example?

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

No branches or pull requests

4 participants