buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

missing subdir_glob implementation?

Open cartazio opened this issue 1 year ago • 6 comments

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

cartazio avatar Jun 12 '23 21:06 cartazio

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.

cjhopman avatar Jun 23 '23 19:06 cjhopman

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 avatar Sep 23 '23 03:09 ndmitchell

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

ndmitchell avatar Sep 24 '23 22:09 ndmitchell

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

cartazio avatar Nov 20 '23 20:11 cartazio

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

ndmitchell avatar Nov 22 '23 22:11 ndmitchell

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?

cartazio avatar Nov 24 '23 17:11 cartazio