Comments (6)
I can probably try to write a patch for this too, if it's deemed acceptable and easy to review/integrate; I don't know how difficult it is to "back-port" changes from GH into the Meta repository in this manner, so if it's harder than just making the change on all of y'alls end, I can wait.
from buck2.
from buck2.
We do have https://github.com/facebookincubator/buck2/blob/main/CONTRIBUTING.md, but I've just revised that and put up an internal diff to make it also read:
Buck2 is currently developed in Meta's internal repositories. Code that is developed internally gets reviewed, sent through CI, committed, and then automatically mirrored out to GitHub every 15 minutes. Code that arrives through a PR is reviewed by a Meta developer on GitHub, then once accepted, moved into our internal workflow where it is reviewed, sent through CI, committed and added to the repo. We maintain both external CI (the results of which are visible on GitHub) and a more thorough internal CI (building internal projects etc). Alas, our full test suite is not yet mirrored to the open source repo, but we hope to fix that in due course.
TLDR: We welcome PRs, and they are actually remarkably easy to merge (if we are around, but as of now, I think almost no one is!)
If you want to make your repo plug and play, using inotify is probably fine. Watchman is really useful if you have a huge repo, or are using a Sapling-backed virtual disk. If not, then inotify works great. That's the reason we pick inotify as the default for open source - to increase plug and play ability.
from buck2.
I tried implementing this over the holiday break but got stuck. I initially tried a naive approach where configuration is parsed, here. Basically: split on ,
in the string, and try every option in a for
loop until one worked.
But that failed. I think what's happening in this code is that the buck
client program is telling the daemon which of the two file watcher APIs to use. It then tries to enable one, e.g. watchman, and fails, which causes the daemon to fail instead, not the client program, and that causes an unrecoverable failure. I think. Maybe it is all in the server. I don't quite understand the code layout yet and I'm pretty new at Rust, especially on a codebase this size.
I'll post my initial attempt later but needless to say I'd still quite like this. As a workaround, at the moment I simply hardcode aarch64-linux
to use notify
and ignore the configuration setting entirely using this patch. This roughly gets me the UX I want on multiple platforms, and once this is implemented, should be much less hacky.
from buck2.
Generally the file watcher lives in the daemon, so I wouldn't expect much to happen in the client (broadly speaking, the client is just a argument parser and output console). When you say fail, do you mean with a panic or with a anyhow::Error
? If it's a panic, that's probably the bug and should be fixed. If it's an Error, that should be easy to ignore and select the next one on.
Alternatively, if Watchman provided binaries for aarch64-linux, would that solve the problem? Should be easy to reach out to that team.
Separately, I am curious why you want to default to watchman at all? Wouldn't notify be sufficient? For really big repos, especially ones backed by Sapling/Mercurial, Watchman is a great idea. Otherwise, I imagine notify is good enough.
from buck2.
So, following up on this: I got on a phone call with Neil a while back and explained that one use case for watchman was integration with Sapling's virtual filesystem, which I intend to explore once it's stable and in a FOSS release. That's a major motivation for integrating watchman reliably and early on.
And recently, after a miraculous amount of work from the Nixpkgs community, a recent change added an up-to-date watchman binary, as well as all the dependencies -- and it works on aarch64-linux
! See thoughtpolice/buck2-nix@81a2e8c and NixOS/nixpkgs#181787 for info.
So my need for this feature has basically gone away. Nixpkgs can provide aarch64-linux binaries for my users instead.
I also made an upstream issue about this, so non-Nix users can also have binary builds; see facebook/watchman#1094 — but it remains unresolved, due to a lack of appropriate aarch64 builders for GitHub Actions. We'll have to wait until GitHub deploys Ampere builders at some point, I guess...
Closing this for now to reduce issue clutter and because the original (niche) motivation has gone away.
from buck2.
Related Issues (20)
- buck2 fails to build on m3 mac
- Treat
- Test
- Does not prebuilt_cxx_library.static_lib support $(location //:target)? HOT 3
- Conflicting inputs on erlang build of Opentelemetry HOT 1
- error: Variable `typing` not found HOT 2
- Excluding rules from certain platforms HOT 6
- Unable to `buck2 clean` a repo which uses `git_fetch()` on Windows
- `configured_alias` and configuration modifiers HOT 2
- review Go analysis.Pass.Module proposal
- Creating symbolic links to toolchains HOT 10
- Early-building some parts of graph HOT 7
- How to use "buck2 clean" or other commands to delete only the generated files (cache) without killing the daemon? HOT 2
- Question: how to pass dependencies that change state forward across a non-output-changing rule HOT 4
- buck2 : Is java supported as a part of buck2 HOT 2
- Share work across configurations by setting working directory for actions then canonicalizing that working directory in RE HOT 5
- How to use multiple execution platforms HOT 1
- Distributed project.ignore
- How to use c/aquery to find the dependents of an anon_target HOT 3
- Trouble linking Apple Frameworks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buck2.