facebook / buck2

Build system, successor to Buck
https://buck2.build/
Apache License 2.0
3.54k stars 217 forks source link

missing subdir_glob implementation? #422

Open cartazio opened 1 year ago

cartazio commented 1 year ago

I've been trying out using buck2 on some C++, and i've noticed that while theres references to subdir_glob, it isn't implmented. I'm not sure if that is expressible in starlark or needs to be a primitive in buck2 itself though

cjhopman commented 1 year ago

It can be expressed in starlark. Here's an implementation I found: https://github.com/LoopPerfect/rxterm/blob/master/subdir_glob.bzl. It looks basically the same as our internal one, maybe that's actually available already too.

ndmitchell commented 1 year ago

We seem to recommend this as the standard pattern with things like android_resource. Should we move subdir_glob into the prelude and perhaps even make it available alongside glob by default?

ndmitchell commented 1 year ago

Moving this to the buck2 repo where we are aiming to keep all our issues together.

cartazio commented 10 months ago

asking again since i'm looking at this project i want to do again, and i'm fuzzy on how to do this still

ndmitchell commented 10 months ago

Where are you hoping to use subdir_glob? Is https://github.com/LoopPerfect/rxterm/blob/master/subdir_glob.bzl sufficient?

cartazio commented 10 months ago

so the problem i'm hitting is, to use buck2 testing functionality with C++, i have to include GTest! Is there some documented mechanism for doing this thats not on the main documentation site?