benonymus

benonymus

Strange warnings when `use`ing ok_jose library

Hey,

I started to play around with the ok_jose library in a project, and when I compile the code I get these warnings:

warning: this clause cannot match because a previous clause at line 73 always matches
Warning: lib/projx/sessions/schemas/session.ex:145

warning: this clause cannot match because a previous clause at line 73 always matches
Warning: lib/projx/sessions/schemas/session.ex:158

warning: this clause cannot match because a previous clause at line 73 always matches
Warning: lib/projx/sessions/transcripts.ex:195

The lines it is pointing to is where I have |> Pipe.ok(),
but where it says the previous clause is, there is nothing, in one file comments for example, other completely other function.
If I remove |> Pipe.ok() the warning goes away.
if I remove the use OkJose the warnings go away as well, but that results in new problems.

I am on elixir:1.13.1

Any ideas?

I also tried this in a new empty project, but no issues there for now.

Thanks

Marked As Solved

benonymus

benonymus

Yeah, I decided due to time constraint to switch to https://github.com/CrowdHailer/OK#ok-pipe for now. Thanks for checking!

Also Liked

Nicd

Nicd

It seems Pipe.ok compiles to a case statement of some sort: https://github.com/vic/ok_jose/blob/2840d629a47bb7ed1f0339e422b571671639d468/lib/ok_jose/def_pipe.ex so I assume it has clauses that are ordered badly or something similar.

In fact I see there has been a similar problem earlier also: https://github.com/vic/ok_jose/issues/1

Where Next?

Popular in Questions Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement