-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@version undefined in mix.exs #45
Comments
version is defined in mix.exs as far as I can tell. How exactly are you getting this error? |
here's the mix.exs file: https://gist.github.com/frpaulas/771d87084bad800a56442f4360467556 I would get the warning message when ever I did |
Oh I think you see that warning because you haven't specified a version of Mock is published on hex so you can just depend on it that way rather than
|
What if the dependency is in a downstream project that we can't fix? Can you instead check to see if the version is there before relying on it? I haven't seen similar behavior in other libraries when downloaded from github. |
Tried depending on mock via hex, but I still see the warning. Anyway, seems like a package should not emit warnings depending on how the dependency is expressed. If you look at similar usage of @Version in mix.exs files, you'll notice that @Version is defined near the top. See:
You need to do that. |
Thanks. Its kinda strange because the mix documentation doesn't mention anything about this (https://hex.pm/docs/publish) but i agree a lot of packages seem to do this. Anyway I've pushed a version that has this. |
Let me know if it resolves it and I'll close the ticket. |
I'm on mock 0.1.3 and still see the warning. I think you should have something like this: defmodule Mock.Mixfile do
use Mix.Project
@version "0.1.3"
def project do
[app: :mock,
version: @version,
...
end |
I've published an updated version to hex. Please let me know if you still have problems. |
Shouldn't
@version
be defined in mix.exs. ?It's been throwing
Thanks for the help
paul
The text was updated successfully, but these errors were encountered: