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

Additional source path outside of project dir not included (no additional content root generated) #324

Closed
vmarcinko opened this issue Mar 23, 2014 · 2 comments
Labels
released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@vmarcinko
Copy link

If additional source path is setup to be outside of project root dir (eg. for some development purposes to reference other source dirs), then cursive should generate additional "content root" for this module (beside main one corresponding to project root dir) that includes this path.

Here is example of project.clj piece:

  :profiles     {:dev {:dependencies [[org.clojure/clojure      "1.5.1"]
                                                       [com.cemerick/pomegranate "0.2.0"]
                                                       [digest                   "1.4.3"]]
                       :source-paths ["../boot/src" "src"]}})
And error is reported:
The file 'C:/IdeaProjects/open_source/boot/src' is not under content entry root 'C:/IdeaProjects/open_source/boot.core'
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.b(ContentEntryImpl.java:332)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.a(ContentEntryImpl.java:284)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.a(ContentEntryImpl.java:279)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.addSourceFolder(ContentEntryImpl.java:203)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.addSourceFolder(ContentEntryImpl.java:210)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.addSourceFolder(ContentEntryImpl.java:196)
    at com.intellij.openapi.roots.impl.ContentEntryImpl.addSourceFolder(ContentEntryImpl.java:189)
    at cursive.leiningen.module.ModuleCreationUtils$1.run(ModuleCreationUtils.java:110)
    at com.intellij.openapi.application.RunResult.run(RunResult.java:37)
    at com.intellij.openapi.application.WriteAction$1$1.run(WriteAction.java:47)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:981)
@cursive-ide
Copy link
Owner

I'm not sure that Cursive can do this automatically - I don't think IntelliJ does either. Normally you'd set the extra content root up by hand. It would be difficult to decide where to place the content root - right where the source directory is, or in a higher directory?

@cursive-ide cursive-ide added this to the 1.4.0-eap3 milestone Sep 8, 2016
@cursive-ide
Copy link
Owner

See here for implementation discussion.

@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

3 participants