b1az
Mix warning won't resolve
I’m still getting "a previous clause at line 1 always matches" warning below, even though I long ago removed the .ex file that was re-defining the problematic DefineMessage module from exprotobuf:
> mix deps.compile
> mix compile
==> my_app
Compiling 13 files (.ex)
warning: this clause cannot match because a previous clause at line 1 always matches
lib/exprotobuf/define_message.ex:1
This was indeed a valid warning for this project, as it used to contain a same-named module DefineMessage. The module was in a file under config/, and on deployment it would overwrite exprotobuf’s own module: we’d literally do
cp config/our_define_message.ex \
deps/exprotobuf/lib/exprotobuf/define_message.ex
A similar issue on GitHub was supposedly already resolved.
In despair, grep from the project root, with grouped output between .elixir_ls/, _build/ and deps/:
> grep -R DefineMessage .
Binary file ./.elixir_ls/dialyzer_tmp/.elixir_ls/build/_test/lib/exprotobuf/ebin/Elixir.Protobuf.Builder.beam matches
Binary file ./.elixir_ls/dialyzer_tmp/.elixir_ls/build/_test/lib/exprotobuf/ebin/Elixir.Protobuf.DefineMessage.beam matches
./.elixir_ls/build/_test/lib/exprotobuf/ebin/exprotobuf.app: 'Elixir.Protobuf.DefineMessage',
Binary file ./.elixir_ls/build/_test/lib/exprotobuf/ebin/Elixir.Protobuf.Builder.beam matches
Binary file ./.elixir_ls/build/_test/lib/exprotobuf/ebin/Elixir.Protobuf.DefineMessage.beam matches
Binary file ./_build/dev/lib/my_app/.mix/compile.app_tracer matches
./_build/dev/lib/exprotobuf/ebin/exprotobuf.app: 'Elixir.Protobuf.DefineMessage',
Binary file ./_build/dev/lib/exprotobuf/ebin/Elixir.Protobuf.Builder.beam matches
Binary file ./_build/dev/lib/exprotobuf/ebin/Elixir.Protobuf.DefineMessage.beam matches
grep: ./deps/setup/xtest/testapp-2/rebar: No such file or directory
grep: ./deps/setup/xtest/testapp-1/rebar: No such file or directory
./deps/exprotobuf/lib/exprotobuf/define_message.ex:defmodule Protobuf.DefineMessage do
./deps/exprotobuf/lib/exprotobuf/builder.ex: import Protobuf.DefineMessage, only: [def_message: 3]
Any ideas where the issue might lie much appreciated.
First Post!
patfranciso
Most Liked
mfilej
FWIW this turned out to be because we were accidentally defining a field twice with the same name.
3
Popular in Questions
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
i’m a new one to elixir
which editor can i use
vs code? or atom?
Thanks! :smiley:
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Other popular topics
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









