Page MenuHomePhabricator

Cleanup: Elixir Hive adapter should generate better type structure
Open, Needs TriagePublic

Description

Our Hive adapter generates most of its API from a Thrift definition by code-generating Erlang and Elixir. Currently, the Erlang record structures are present in the Elixir file but the representation is mostly generated explicitly:

{:TSessionHandle, {:THandleIdentifier, :undefined, :undefined}}

However, this would be better written as:

TSessionHandle.record()

where the record type should be defined as,

@type t :: record(:record, sessionHandle: TSessionHandle.t(), configuration: term())

It should be possible to modify code generated to emit these better types.