nutritious-monkey-78516
12/06/2018, 5:44 PMenough-analyst-54434
12/06/2018, 5:47 PMnutritious-monkey-78516
12/06/2018, 5:54 PMfrom foo.bar import helloworld
I find myself having to have a BUILD
file at the parent of /foo
instead of /foo/bar/BUILD
enough-analyst-54434
12/06/2018, 5:57 PMsrc/python
. When it can't auto-guess your source roots, it assumes the source root is where the BUILD file lives. I'm guessing your repo layout is:
foo/
__init__.py
bar/
__init__.py
setup.py
nutritious-monkey-78516
12/06/2018, 5:59 PMenough-analyst-54434
12/06/2018, 6:01 PMbrief-engineer-67497
12/06/2018, 6:02 PMenough-analyst-54434
12/06/2018, 6:02 PMbrief-engineer-67497
12/06/2018, 6:04 PMregister('--source-root-patterns', metavar='<list>', type=list, fingerprint=True,
default=cls._DEFAULT_SOURCE_ROOT_PATTERNS, advanced=True,
help=pattern_help_fmt.format('source'))
how do I now what is the scope in pants.ini ?[source]
rout-patterns: [<val>]
?enough-analyst-54434
12/06/2018, 6:06 PM--
and convert -
to _
, you can always:
$ ./pants options | grep source_root_patterns
source.source_root_patterns = ['src/*', 'src/main/*'] (from HARDCODED)
[source]
source_root_patterns: [<vals>]
brief-engineer-67497
12/06/2018, 6:10 PMnutritious-monkey-78516
12/06/2018, 6:10 PMenough-analyst-54434
12/06/2018, 6:11 PMbrief-engineer-67497
12/06/2018, 6:12 PMenough-analyst-54434
12/06/2018, 6:13 PMnutritious-monkey-78516
12/06/2018, 6:13 PMpants.ini
brief-engineer-67497
12/06/2018, 6:14 PMapp
directorynutritious-monkey-78516
12/06/2018, 6:14 PMenough-analyst-54434
12/06/2018, 6:15 PMnutritious-monkey-78516
12/06/2018, 6:16 PMBUILD
file that is pulling everything in.enough-analyst-54434
12/06/2018, 6:30 PM[source]
source_roots: {
'': ['python']
}
nutritious-monkey-78516
12/06/2018, 6:31 PMenough-analyst-54434
12/06/2018, 6:31 PMnutritious-monkey-78516
12/10/2018, 10:17 PMenough-analyst-54434
12/10/2018, 10:59 PMnutritious-monkey-78516
12/10/2018, 11:17 PM