This is still not fully correct, but it's much better. There are two
problems that are somewhat difficult to solve:
1) although they are polymorphic from an attributes/methods standpoint,
`static_library()`, `shared_library()`, and `shared_module()`
actually return distinct types, and they are not always valid in the
same places; ie, only StaticLibrary can be passed to `link_whole:`
2) several arguments that are common to all take different types,
namely `sources`
3) `jar()` is really it's own thing, and should be treated as its own
thing, not sharing the same base class. That means replicating for
build_targets() the same sort of structure that exists in
type_checking.py
interpreter: deprecate passing 'jar' to build_target
This never made any sense, as jar() takes different arguments, and even
when it takes the same arguments, it has a different set of allowed
types. This makes validating arguments between the two incredibly
tedious and painful.
modules/python3: use typed_kwargs for extension_module
I don't really want to be mucking with this, but I do want to remove the
`known_*_args` stuff, and this is required. Basically it's the same as
the python module.
This moves the FeatureNew check for strings out of the helper, and into
the typed_kwargs decorator. This also changes the warning for passing an
absolute path to d_import_dirs to a FeatureDeprecated check. Since we've
hit 1.0, we shouldn't remove deprecated functionality until 2.0, thus
let's treated this as a deprecated "feature", and provide a nicer
message.