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

.edts config ignored if there is .git upper in path #72

Closed
altrg opened this issue Jul 11, 2013 · 12 comments
Closed

.edts config ignored if there is .git upper in path #72

altrg opened this issue Jul 11, 2013 · 12 comments

Comments

@altrg
Copy link
Contributor

altrg commented Jul 11, 2013

Edts doesn't start project for following dir structure

project
├── erlang/
│   ├── apps/
│   ├── deps/
│   ├── docs/
│   ├── priv/
│   ├── rel/
│   ├── configure.sh*
│   ├── .edts
│   ├── .gitignore
│   ├── Makefile
│   ├── readme
│   └── rebar.config
├── .git/
│   ├── branches/
│   ├── hooks/
│   ├── info/
│   ├── logs/
│   ├── objects/
│   ├── refs/
│   ├── config
│   ├── description
│   ├── HEAD
│   ├── index
│   └── packed-refs
├── node/
│   └── .gitignore
├── static/
│   ├── css/
│   ├── images/
│   └── js/
├── www/
│   └── .gitignore
└── Makefile

@tjarvstrand
Copy link
Collaborator

Thanks for the report. I'm aware of the issue, and it's very annoying indeed. It's due to the fact that eproject contains a definition for a basic git-project which will be preferred over edts if it is further up in the file tree. I have been thinking about how to solve this for a while but I haven't yet found a satisfying solution that can either be incorporated into edts without forking eproject or that will be accepted into upstream eproject :( Any ideas would be very welcome.

@tjarvstrand
Copy link
Collaborator

Actually I think I might have an acceptable solution for this. Will look into it when I get back from vacation.

@altrg
Copy link
Contributor Author

altrg commented Jul 27, 2013

Awesome! Great work, Thomas!

@tjarvstrand
Copy link
Collaborator

I believe this should now be fixed. The fix is slightly hackish but seems to work :)

Please re-open this issue if your problems persist.

@bboozzoo
Copy link
Contributor

Did you forget to push? :) I don't see the fix in current master

@tjarvstrand
Copy link
Collaborator

Yup it's right there. The relevant code is in edts-setup and edts-project-selector.

There's even an integration test called edts-project-selector-test.

Are you experiencing problems with it?

@bboozzoo
Copy link
Contributor

Reverting 5dcb9ab fixes things for me and project is properly picked up as edts, otherwise it's incorrectly identified as generic-git. Funny that eproject-project-type has overridden values, and (eproject--all-types) returns:(edts-temp edts-otp edts generic).
Value of eproject-attributes-alist:
(("/home/mborzecki/work/test.project/" :type generic-git :name "test.project" :irrelevant-files ("^[.]" "^[#]" ".git/") :relevant-files (".*") :irrelevant-files ("^[.]" "^[#]") :file-name-map ...))

Seems like eproject hooks are run before erlang-mode hooks.

Emacs version: GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.8.2) of 2013-08-14 on buildvm-15.phx2.fedoraproject.org

@tjarvstrand tjarvstrand reopened this Aug 19, 2013
@tjarvstrand
Copy link
Collaborator

Will try to look into this tonight.

@tjarvstrand
Copy link
Collaborator

@bboozzoo
Could you try with the branch advice-to-limit-project-types and see if that works for you?

@bboozzoo
Copy link
Contributor

I think that fed315f is bad. All projects will be classified as edts-temp as it appears as a last entry and all project definitions have same list of relevant files.

There's something weird going on. If project directory has dots (ex. some.test.project) then .edts is not loaded, project is incorrectly classified as generic-git and erlang node cannot be started. Removing the dots, the problem disappears.

@tjarvstrand
Copy link
Collaborator

If that commit is in your history you're on the wrong branch :)

@bboozzoo
Copy link
Contributor

Thomas Järvstrand writes:

You're on the wrong branch :)
True. It works now. Project type is correct, .edts was picked up, node
name is correct and node is up and running.

Thanks!

Maciek Borzęcki

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

No branches or pull requests

3 participants