What does // refer to when you have nested Buck projects?

隐身守侯 提交于 2019-12-11 06:25:55

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/41806750/what-does-refer-to-when-you-have-nested-buck-projects

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!