jolly-midnight-72759
05/14/2020, 3:20 AM--source-source-roots option. In our old pants.ini file the section is defined as a dictionary like so:
[source]
source_roots: {
"3rdparty/go": (u"go_remote",),
"contrib/go/examples/3rdparty/go": (u"go_remote",),
"app1": (u"python",),
"app2": (u"python",),
}
When I translate this to TOML:
[source]
source_roots = """{
"3rdparty/go": "(u'go_remote',)",
"contrib/go/examples/3rdparty/go": "(u'go_remote',)",
"app1": "(u'python',)",
"app2": "(u'python',)",
}"""
I get the following error
DeprecationWarning: DEPRECATED: option 'source_roots' in scope 'source' will be removed in version 1.30.0.dev0.
Use --roots instead.
If I change source_roots to roots I get this error Invalid option 'roots' under [source] in /Users/raul/dev/cb/chartbeat/pants.toml. When I go to https://pants.readme.io/docs/source-roots it only talks about root_patterns.
So I am confused about what to change the source_roots to. And I should note, that works because I can see my settings when I run ./pants --no-verify-config help-advanced sourcehundreds-father-404
05/14/2020, 3:23 AMhundreds-father-404
05/14/2020, 3:25 AMjolly-midnight-72759
05/14/2020, 3:52 AM--source-source-roots=<map>
default: { '3rdparty/go': ('go_remote',), 'contrib/go/examples/3rdparty/go':
('go_remote',), 'sharknado3': ('python',), 'sharknado': ('python',),
'pycb/cb_conf': ('python',), 'pycb/cb_path_class': ('python',),
'pycb/cb_check_opentsdb': ('python',), 'pycb/cb_mercury': ('python',) }
A map of source roots for source code to list of languages. Useful when you want
to enumerate fixed source roots explicitly, instead of relying on patterns.
DEPRECATED. will be removed in version: 1.30.0.dev0.
Use --roots instead.jolly-midnight-72759
05/14/2020, 3:53 AM--source-source-roots=<map>
default: { 'src/go/src': ('go',), 'src/main/go/src': ('go',) }
A map of source roots for source code to list of languages. Useful when you want
to enumerate fixed source roots explicitly, instead of relying on patterns.
DEPRECATED. will be removed in version: 1.30.0.dev0.
Use --roots instead.happy-kitchen-89482
05/14/2020, 4:00 AMhappy-kitchen-89482
05/14/2020, 4:01 AMroot_patterns and it should just be a list of source roots without all the language details.happy-kitchen-89482
05/14/2020, 4:01 AMhappy-kitchen-89482
05/14/2020, 4:01 AMjolly-midnight-72759
05/14/2020, 4:01 AMjolly-midnight-72759
05/14/2020, 4:02 AMsource_roots get's a lot of hits. 🙂jolly-midnight-72759
05/14/2020, 4:04 AMsrc/python/pants/source/source_root.py 🚀❓jolly-midnight-72759
05/14/2020, 4:16 AMsource_roots produces the same output as 1.18.0:
--source-source-roots=<map>
default: { '3rdparty/go': (u'go_remote',), 'contrib/go/examples/3rdparty/go': yada yada
When I use root_patterns, ./pants --no-verify-config help-advanced source does not show the right thing.jolly-midnight-72759
05/14/2020, 4:16 AMjolly-midnight-72759
05/14/2020, 4:39 AMhundreds-father-404
05/14/2020, 4:54 AMjolly-midnight-72759
05/14/2020, 4:58 AMrc0 no apology necessary.jolly-midnight-72759
05/14/2020, 4:59 AMsrc/python/pants/source/source_root.py
I see that it too is depreciated.
register(
"--source-root-patterns",
metavar="<list>",
type=list,
fingerprint=True,
default=cls._DEFAULT_SOURCE_ROOT_PATTERNS,
advanced=True,
removal_version="1.30.0.dev0",
removal_hint="Use --roots instead.",
help=pattern_help_fmt.format("source"),
)jolly-midnight-72759
05/14/2020, 5:02 AMhundreds-father-404
05/14/2020, 5:20 AMroot_patterns in the source scope, aka --source-root-patterns. It looks like that very similar option is called --source-source-root-patternshappy-kitchen-89482
05/14/2020, 5:46 AM