opencensus-beam / opencensus_absinthe

Opencensus integration with Absinthe
Apache License 2.0
20 stars 5 forks source link

Dialyzer failures #7

Closed garthk closed 5 years ago

garthk commented 5 years ago

Picked up while setting up CI: the default_pipeline/2 advertised in the documentation was renamed to traced_pipeline/2 during extraction. I didn't pick it up during post-extraction testing because I use a custom pipeline.

Workaround: use ~a custom pipeline~ traced_pipeline.

garthk commented 5 years ago

No, wait. I'm confused. I had fixed the docs: the missing default_pipeline/2 is in Absinthe.Plug… except there it is in deps/absinthe_plug/lib/absinthe/plug.ex:442. I'm sure I'll figure out what's going on tomorrow, but any hints overnight would be handy.

garthk commented 5 years ago

Local repro:

:0:unknown_function
Function Absinthe.Plug.default_pipeline/2 does not exist.
________________________________________________________________________________
:0:unknown_type
Unknown type: Result.Object.t/0.
________________________________________________________________________________

Not very specific. And, I'm pretty sure it's there.

garthk commented 5 years ago

Aha, got it. only: :dev, runtime: false.

garthk commented 5 years ago

Having sprinkled some Kernel.call/3 on the problem, I'm left with:

Unknown type: Result.Object.t/0.

I think that's something about Absinthe making Dialyxir unhappy. @ratbag98, how did checking with Ben re jeremyjh/dialyxir#306 turn out? Putting in the missing aliases for the typespecs in execution.ex didn't help.

garthk commented 5 years ago

For now, I'm getting it done by ignoring the warnings:

:0: Unknown type 'Elixir.Result.Object':t/0
:0: Unknown function 'Elixir.Absinthe.Plug':default_pipeline/2

If time permits, I'll submit a PR to Absinthe to fix the former.

Let me know if you think I should switch to a run-time check and Kernel.call/3 to fix the latter.