Open tdyas opened 3 years ago
Updated to instead focus on using ExplicitlyProvidedDependencies.maybe_warn_of_ambiguous_dependency_inference
to handle ambiguous dependencies. Relates to https://github.com/pantsbuild/pants/issues/13114, which is the only time I'd realistically expect there to be ambiguous deps.
The dependency inference rules need refactoring since there is duplication currently between the rule applied to
go_package
targets and the rule applied to_go_ext_mod_package
targets (because_go_ext_mod_package
does not have a sources field).Ideas:
_go_ext_mod_package
that extends theGoPackageSources
field used forgo_package
targets. Merge the rules into a single rule by inferring forGoPackageSources
which is now a superclass of the hidden sources field and so the rule should trigger for bothGoPackageSources
and the hidden sources field.FirstPartyPythonModuleMapping
andThirdPartyPythonModuleMapping
).