is that setting hte same options that you might in...
# development
is that setting hte same options that you might invoke from the command line, that you register within calls to
the command line or environment or pants.ini files
so the calls in the test I'm trying to make work are of the form
self.set_options_for_scope('source', source_roots=source_root_dict)
by itslef isn't an option, right?
but wait,
seems to be?
ah, sorry
./pants options | grep -i source
can sometimes be a useful way to find the option you want
i alternately do things like
rg -F '--source-roots'
in the pants repo because all pants options are registered with
register('--source-roots', ...)
(did you figure this out?)
no I didn't
as far as I can tell right now, with this set of debug prints:
when I run
/pants test tests/python/pants_test/backend/graph_info/tasks:root
(my new test), there is an options type being passed to
of type
, and it's trying to insert the go source roots
'src/go/src': ('go',), 'src/main/go/src': ('go',)}
whereas if I run
./pants test tests/python/pants_test/core_tasks:roots
(the old test)
the constructor of
gets an options value of
(I'm printing the same variable each time)
and that correctly adds the source root
{'fakeroot': ('lang1', 'lang2')}
, which is what the test should be mocking
I cannot figure out 1) why my new test is getting a different options type than my old test or 2) how I sould be correclty instantiating the source root in the new version of the test
take a look at how the List test does it.
options are computed from an OptionsBootsrapper