Skip to content
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

elvis_core violates OTP naming conventions #491

Closed
jesperes opened this issue Sep 20, 2018 · 5 comments
Closed

elvis_core violates OTP naming conventions #491

jesperes opened this issue Sep 20, 2018 · 5 comments
Assignees

Comments

@jesperes
Copy link

jesperes commented Sep 20, 2018

According to OTP naming conventions (see http://erlang.org/doc/design_principles/applications.html#directory-structure), the application resource file is supposed to be src/${application}.app.src, but for elvis_core this file is called src/elvis.app.src. Also, the file contents specifies the application name to be "elvis" instead of "elvis_core".

  application, elvis,
  [
   {pkg_name, elvis_core},
...

This means that we cannot start the elvis_core application as documented by doing application:start(elvis_core).:

===> Verifying dependencies...
===> Compiling elvis
Erlang/OTP 19 Klarna-g270c04d412 [erts-8.3.5.4] [source-270c04d412] [64-bit] [smp:4:4] [async-threads:1] [hipe] [kernel-poll:false]

Eshell V8.3.5.4  (abort with ^G)
1> application:start(elvis_core).
{error,{"no such file or directory","elvis_core.app"}}
2> 
@elbrujohalcon
Copy link
Member

That's because the application in that repository (http://github.com/inaka/elvis_core), despite the repo's name, is actually elvis.
The problem arose when we split elvis_core from this repo (http://github.com/inaka/elvis). We couldn't change this repo's name because there were links pointing to files living here, but this app is not elvis, this one is now called elvis_shell. 🤦‍♂️
Terribly confusing, I know.
It's something we do want to change eventually, but we're not entirely sure when we'll get there since it requires a bunch of additional changes in several different repos.

elbrujohalcon added a commit to inaka/elvis_core that referenced this issue Sep 20, 2018
This is partial/temporary fix for inaka/elvis#491
@elbrujohalcon
Copy link
Member

I adjusted the README.md in inaka/elvis_core#105 but I'll leave this ticket open since we do have the desire to fix it properly.

@jesperes
Copy link
Author

Ok, so the application in the elvis_core repo is elvis, and the application in the elvis repo is elvis_shell. Confusing, but I can live with that.

@paulo-ferraz-oliveira
Copy link
Collaborator

Milestone removed, since 0.5.0 is in the past.

@jfacorro
Copy link
Contributor

This was fixed in 0.5.0, elvis and elvis_core have the correct names in their .app.src, so we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants