buck-out should be ignored by buck filesystem traversal but didn't

Created on 12 Oct 2017  路  10Comments  路  Source: facebook/buck

According to Buck documentation, buck-out should be ignored by buck filesystem traversal
https://buckbuild.com/concept/buckconfig.html#project.ignore
However, seems the logic is changed and files under buck-out is being parsed by Buck.

A sample to repo the issue:

  1. git clone [email protected]:zayhero/BugSample.git
  2. 2.
brian_zhang ~/projects/BugSample (master) $ buck targets
//:Ignored.BUCK
  1. buck build //:Ignored.BUCK
  2. 4.
brian_zhang ~/projects/BugSample (master) $ buck targets
Buck wasn't able to parse /Users/brian_zhang/projects/BugSample/buck-out/gen/BUCK:
Syntax error on line 1, column 11:
this should show error error
          ^

This shows the BUCK file under buck-out is being parsed which is not align with Buck documentation.
This introduce problems to us when we using react-native. We need to git clone or npm install react native code which contains some sample BUCK files which cause buck build fail.

bug

All 10 comments

+1 - we've seen this problem as well, though it was on a pretty old version of buck, so we didn't report it.

I think we don't notice it @ facebook because we use watchman, and our watchman config excludes buck-out. It seems like the logic for excluding buck-out for certain operations should be applied in buck directly.

@yiding slightly tangential question: do you also use watchman / incremental builds on CI servers? (We haven't been successful in doing so, though it's probably because we do some sketchy things in our build scripts such that buck's caching mechanism doesn't quite work correctly...)

I think we do use watchman on CI.

yes, we enabled watchman on our CI servers a few months ago and all of our builds are using remote caches, so they are trying to be incremental, but we do not preserve any local state between runs, if that's what you meant by incremental.

@ttsugriy ah yeah, that's what I meant. Thanks!

Hi,

I would like to fix this issue. I'm new to Buck and this bug seems good enough for the first contribution, what do you think?
Do you have some thoughts about where to start from? I guess I need to find a code that traverses filesystem and check if it ignores buck-out and I'll search it by myself, but it will be easier with your advice.

So far I did search for "buck-out" in code and indeed didn't find anything that looks like this directory is ignored somewhere. Though I'm not familiar with the code yet and could easily miss something.

@kageiit can you confirm and close the issue?

I cant close this issue. only someone on the buck team can. Maybe @styurin

Was this page helpful?
0 / 5 - 0 ratings