What does // refer to when you have nested Buck pr

2019-07-25 15:22发布

I am using Buck to build my project, but I have a complicated folder structure due to the use of Git submodules. My project layout looks like this:

+ root
+-- .buckconfig // X
+-- BUCK // A
+-- main.cpp
+--+ library // Git Submodule!
   +-- .buckconfig // Y
   +-- BUCK // B
   +--+ anotherLibrary
      +-- .buckconfig
      +-- BUCK // C

In BUCK file C, I have a path like this: //:library. When not used as a submodule, // will be resolved to library/. This is the behaviour I want, even when library is a submodule.

In the above layout, will // be resolved to .buckconfig X or .buckconfig Y?

标签: git buck
1条回答
Viruses.
2楼-- · 2019-07-25 15:50

It depends where you run buck from. If you run the buck root command, it'll tell you where // refers to.

It looks like you might want to take advantage of a feature of Buck that isn't documented (and still changing) called Cells. The best documentation for that is likely one of Buck's tests.

查看更多
登录 后发表回答