> something about that feels strange, because f...
# development
h
something about that feels strange, because for sources, the conversion is ProtocSources  -> PythonSources
This is not true. The conversion is
HydrateSourcesRequest(ProtobufSources) -> HydratedSources
. We only use
PythonSources
as a way to express intent that “I want this to be something like PythonSources”. I don’t think we need that notion here. You will always get all dependencies - the call site can filter out irrelevant ones, like how we do currently in
importable_python_sources.py
. Part of the reason we do not need to specify the “output type” is that there’s no ambiguity problem, here. With codegen of sources, you can go from ProtobufSources to multiple different languages, but you only want one distinct language. With dependencies, it’s fine for us to add all the runtime dependencies; it’s acceptable afaict if we always injected a
JarLibrary
,
PythonRequirementLibrary
, etc, when calling
await Get[Addresses](DependenciesRequest(protobuf_library[Dependencies])
. The call site can ignore the
JarLibrary
if it wants to