Gradualizer icon indicating copy to clipboard operation
Gradualizer copied to clipboard

badkey crash in typechecker:do_type_check_expr_in

Open tsloughter opened this issue 3 years ago • 0 comments

I'm not sure what the typechecker is trying to do here that it has Span in what looks like its current context, while looking for InstrumentationLibrary?

I can try to narrow down where it is happening with some pointers on what it is trying to do.

I'm not sure what module it is crashing on in https://github.com/open-telemetry/opentelemetry-erlang

I guess the module could be included if the crash were fixed to handle the error in the plugin and print a message instead of going to rebar3.crashdump.

The full error from the rebar3 plugin:

Error: {badkey,'InstrumentationLibrary'}
[{erlang,map_get,
         ['InstrumentationLibrary',#{'Span' => {type,0,any,[]}}],
         [{error_info,#{module => erl_erts_errors}}]},
 {typechecker,do_type_check_expr_in,3,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,2241}]},
 {typechecker,type_check_expr_in,3,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,2234}]},
 {typechecker,type_check_fields,4,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,1910}]},
 {typechecker,do_type_check_expr,2,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,1695}]},
 {typechecker,type_check_expr,2,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,1486}]},
 {typechecker,do_type_check_expr,2,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,1499}]},
 {typechecker,type_check_expr,2,
              [{file,"/home/tristan/Devel/opentelemetry-erlang/_build/default/plugins/gradualizer/src/typechecker.erl"},
               {line,1486}]}]

tsloughter avatar Jan 26 '22 12:01 tsloughter