You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I referenced previous issues related to this error, but it didn't help much. So I went back and checked the source code pointed out in the log.
# origin code{addr,port}=extract_addr_port(uri)Logger.debug("request to destination: #{{addr,port}|>inspect_peername()}")
I tried changing the code to the following form and the error magically disappeared. So I tried a few different ways of writing it and found that none of these below triggered the error:
# first test codedst=extract_addr_port(uri)Logger.debug("request to destination: #{inspect_peername(dst)}")# second test codedst=extract_addr_port(uri)Logger.debug("request to destination: #{dst|>inspect_peername()}")# third test code{addr,port}=extract_addr_port(uri)Logger.debug("request to destination: #{inspect_peername({addr,port})}")
The text was updated successfully, but these errors were encountered:
Thanks for the report, I'll take a look. Lexical shouldn't crash here.
If i was reviewing that code, I would offer that the pipeline is unnecessary in that case and just adds noise. The first code you have there seems more idiomatic to me.
If i was reviewing that code, I would offer that the pipeline is unnecessary in that case and just adds noise. The first code you have there seems more idiomatic to me.
You are right, it is a edge case and not so idiomatic.
I make more test, i presume this error occurs when piping a collection type literal (I'm not sure if this is accurate) to a function in a formatting string?
requireRecordRecord.defrecord(:foo,hello: "world")# these will triggered error"test: #{{"localhost",443}|>inspect_peername()}""test: #{["localhost",443]|>inspect_peername()}""test: #{%{}|>inspect_peername()}"# these below won triggered error"test: #{foo()|>inspect()}""test: #{"localhost"|>inspect_peername()}""test: #{65535|>inspect()}""test: #{connect_to_server()|>elem(1)|>inspect()}""test: #{:localhost|>inspect()}"
I got a
Request textDocument/completion failed.
error. Here is the log:I referenced previous issues related to this error, but it didn't help much. So I went back and checked the source code pointed out in the log.
I tried changing the code to the following form and the error magically disappeared. So I tried a few different ways of writing it and found that none of these below triggered the error:
The text was updated successfully, but these errors were encountered: