问题
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