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

Allow SBT projects with ancestor folders named src #135

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

CMoH
Copy link
Contributor

@CMoH CMoH commented Dec 11, 2014

Previously SBTProjectType would ignore folders with an ancestor named
"src" in the path. Instead, check if any of the ancestors is a project
using ProjectManager.isProject().

Previously SBTProjectType would ignore folders with an ancestor named
"src" in the path. Instead, check if any of the ancestors is a project
using ProjectManager.isProject().
@CMoH
Copy link
Contributor Author

CMoH commented Dec 11, 2014

in relation to #134

dcaoyuan added a commit that referenced this pull request Jan 22, 2015
Allow SBT projects with ancestor folders named src
@dcaoyuan dcaoyuan merged commit c098b73 into dcaoyuan:master Jan 22, 2015
@dcaoyuan
Copy link
Owner

Thanks @CMoH, please verify if this patch has fixed #134, if true, we can close it now.

@gaydenko
Copy link

Sorry for intercepting the conversation :) I have tried current master, and now the IDE doesn't see my application subprojects. I have the following structure:

applicationRoot
    project (sbt build files)
    subproject1
    ...
    subprojectN
    aggregatingProject (aggregates and depends on all the others listed above)

The IDE can find a project in applicationRoot dir only, rather in all other listed subdirs.
With plugins portal version all does work fine.

There are raw sbt subprojects as well as Play subprojects (that is with sources dirs named different form src).

@CMoH
Copy link
Contributor Author

CMoH commented Jan 23, 2015

Yes. My fix changes the search for a parent src folder to search for a parent folder that is a project. In this context, subproject1...subprojectN have a parent project.

The need to filter out parents that have a src folder comes from the fact that any folder containing a .scala file could potentially be a sbt project folder. This means that folder MyProject/src can be a new project, and so could MyProject/src/main/scala/some/package if the folder package contains a scala source file. Same goes for any folder called project, for instance.

Checking for the above situation is resource consuming, and other build tools have proven this to be unnecessary. I would rather have a patch that does not allow all the situations SBT can handle, and stick to the rational ones. Or maybe have users tag project folders with a .nbproject file for netbeans.

I don't know what is the best solution to this, but looking for a parent src folder cannot be the appropriate one.

@dcaoyuan
Copy link
Owner

I'll revert the patch first, and see if there is any better solution.

dcaoyuan added a commit that referenced this pull request Jan 23, 2015
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

Successfully merging this pull request may close these issues.

3 participants