An iterator over OptionValueContainer keys.

Review Request #2472 — Created July 13, 2015 and submitted

benjyw
pants
a616705...
pants-reviews
stuhood
Yields exactly one key per option. If multiple keys point to the same
value (because the underlying option was registered with multiple names),
only yields one of them.

Also fixes a minor bug with inverse dest mapping computation. That computation
must properly be done only after all options have been registered, so it's
not confounded by options on inner scopes that shadow names in outer scopes.

CI in flight here: https://travis-ci.org/pantsbuild/pants/builds/70813876

CG
  1. 
      
  2. Cool, this is perfect! So I guess we won't need to loop over only local options, we'll just loop over everything and pick out the ones with "fingerprint=True".

    1. I'm not sure what you mean by "local options"? This is only local options. Each scope has its own OptionValueContainer.

    2. Basically the options registered in, say, Checkstyle->register_options. If I run compile.checkstyle on java_library target, _forwardings isn't limited to just those task-specific options, it has options like "timeout", "pants_distdir", "logdir", etc.

    3. Gotcha, yes, those are the values inherited from outer scopes.

      As I mentioned on slack, this isn't the thing you need anyway, as you need access to the registration kwargs. I have that coming in a separate change.

  3. 
      
ST
  1. Ship It!
  2. 
      
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 94aa2b0b1748189de847cdc676f526d7905e338b.

Loading...