I’m using VS Code 1.23.0, Elixir 1.6.4… ElixirLS is giving me messages that don’t seem to make sense to me.
I’m using the ExAws.EC2 library. I’m calling the function describe_instance_status in the following way:
opts = [filters: ["event.code": "*"]]
EC2.describe_instance_status(opts)
ElixirLS Dialyzer reports:
"severity": 4,
"message": "The call 'Elixir.ExAws.EC2':describe_instance_status(Vopts@1::[{'filters',[{'event.code',<<_:8>>},...]},...]) breaks the contract (opts::describe_instance_status_opts()) -> 'Elixir.ExAws.Operation.Query':t()",
The spec for that function in the library is:
@spec describe_instance_status() :: ExAws.Operation.Query.t
@spec describe_instance_status(opts :: describe_instance_status_opts) :: ExAws.Operation.Query.t
The type is defined up above that spec as:
@type describe_instance_status_opts :: [
dry_run: boolean,
filters: [filter, ...],
include_all_instances: boolean,
instance_ids: [binary, ...],
max_results: integer,
next_token: binary
]
The same problems show up running : mix dialyzer from command line. Can someone help me with interpreting what dialyzer is trying to tell me?