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

Feature Request: Folder level bzlgenrc overrides #61

Open
codebreach opened this issue Nov 5, 2020 · 1 comment
Open

Feature Request: Folder level bzlgenrc overrides #61

codebreach opened this issue Nov 5, 2020 · 1 comment

Comments

@codebreach
Copy link

We want different ng_module and visibility on a per folder level projects/a vs projects/b

As far as I can tell, there can only be one .bzlgenrc at the root level.

So the question is - what would it take to support folder level overrides?

I (or someone from our team) can take this up if you need help. We are planning on using bzlgen to help migrate and manage build files in our large (200k LOC) angular codebase.

@mattem
Copy link
Contributor

mattem commented Nov 6, 2020

Correct, currently only a root level .bzlgenrc file is supported.

The rc file and all flags are resolved within Flags#setupAndParseArgs. If the files were placed in the folder they were overriding, this would then have to search up from the given <path> until it found any folder level rc files, until it reached the root, and then merged them. Alternative to searching for overrides is perhaps listing them in the root, and loading them in.

Another approach would be to have a mapping of folder to override flags, as a prefix to the value perhaps, --default_visibility=projects/a=//project/b:__pkg__ which would set the default visibility to //project/b:__subpkg__ when generating in projects/a.

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

2 participants