-
Notifications
You must be signed in to change notification settings - Fork 215
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
How to propagate or inherit certain buckconfig settings in child cells? #417
Comments
And just to be clear, while a generalized solution that could work for any setting would be fantastic, I'd absolutely just settle for a few special cases or alternative that could handle this case without repetition, too. |
In general we want only things that impact core Buck2 in the .buckconfig and most other things in PACKAGE files or constraints. But in this case, I think it does belong in the We are also generally moving to the idea that in most cases the root The combination of those two things means we probably don't want try generalising this too much. Maybe we could have the rule that if a cell doesn't have project-ignore, then we use the root one? That seems probably quite reasonable? Only issue is that relative paths e.g. |
Frankly, although I hate the proliferation of these kinds of files, would it be any easier from an implementation POV to just have a single root file named This is really no different than the status quo today except it has a different UX (by default cells have to turn off inheritance by touching an empty file, versus turning it on by copy-pasting.) But maybe it's enough. I guess it is mostly a matter of if you want to support the "different exclusions in different cell" case, which does seem legitimate. |
I'd love the idea of just following the CC @cjhopman - would that be a good or bad idea? |
I have a
.buckconfig
in the root of the project (that is, next to.buckroot
) that looks like this:To make some things easier to refer to, I gave several of the top-level directories in this project their own cells like
third-party//
, so they have their own.buckconfig
that looks like this (underthird-party/.buckconfig
):However, when I build something out of the
third-party//
cell, it does not inherit the top-levelproject.ignore
:Notably, even though I ran the build from the root directory of the project (i.e. what you would call
root//
), it still used the.buckconfig
file from thethird-party//
cell, so it didn't ignore the.watchman-cookie
files and instead saw them as changed.The only current solution I see is duplicating the
project.ignore
setting across the.buckconfig
of every single cell, but obviously this is kind of unfortunate and easy to mess up. This is my complaint, and what I would like to avoid. So I'd like a way to propagate or inherit this setting to child cells.To be fair, I understand why this is the case overall and as the default; certain properties should definitely not be inherited by default. But would it be possible for certain "special" cases like
project.ignore
to propagate downwards? That would be an immediate fix but it's possibly not the best. Or maybe this should be handled through PACKAGE files or something, somehow? Should there be a newproject.global_ignore
? Or maybe there should be a new a[root]
section that can only be specified in the top-level root.buckconfig
file? I don't really know, but I'd like to just specify this setting once.The text was updated successfully, but these errors were encountered: