How about support for more complicated project dir structure?
Something like in riak project.
For such projects rebar.config in root dir contains:
And for deps:
hello @tdx, support for this is planned.
@tdx can you please point me to a github project structure like the one you are describing or that you'd like to be supported?
This project has deps, but no apps subdir.
added detection for project with more complex structure #12
Hi @tdx, can you please see if latest 64a78a9 implements this as you would expect?
Unfortunately check of existence of rebar.config in the current directory is insufficient. Because each app in apps and in deps can have own rebar.config
I think we need to get list of Sublim Folders (which we added from Project - Add Folder To Project) and go down into project subdirs.
1. For each Folder add completion from ebin dir.
2. If rebar.config exist -> parse and lookup directories from lib_dirs, sub_dirs and may be other.
3. Enter into subdir -> go to 1.
SublimErl just parses all subdirs of what it believes its the root of the project, except the .eunit and test directories, thus there's no need to identify which are the specific directories defined within rebar.
that said, your method implies that you have to have all folders open before this can work, i believe this not to be particularly useful.
i have considered asking for a specific sublimerl file to be inserted in the root of a directory, and look for that one as a reference point. if not found, then do the detection as is right now.
what would you think of this approach?
What will this file contain?
As for me this file already exists. This is rebar.config.
The current problem for me in that when I opening file from other app subdir SumlibErl updates contents of Current-Project* files.
So may be simple to structure contents of completion subdir accoording to project structure?
For example (for project in 1 comment):
that could be an interesting approach, but when would you delete these files? and why should you have autocompletion of projects that are not related?
See this demo project.
thank you for this input. as said though, i don't think i want to force developers to open folders. plus, Current* files are to be considered temporary cache.
this issue is very specific:
i am thinking to refactor the finding of project root anyway, and will try to find a way to cover this case too.
working on it, should probably have a solution within days.
may be store Current-Project files in project root not in plugin dir ?
Hi @tdx, can you check if latest push fixes it?
it'd be nice if you could also check #15 since these are related, and give me feedback there if you feel so.
HI @ostinelli, its work for me on se_demo. Great. Thanks!
I will check on my big projects.
Great. Thank you,
Fixes issue #12