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

mill.scalalib.GenIdea/idea needs to include scala-library compiler-classpath. #512

Closed
htmldoug opened this issue Dec 16, 2018 · 2 comments · Fixed by #531
Closed

mill.scalalib.GenIdea/idea needs to include scala-library compiler-classpath. #512

htmldoug opened this issue Dec 16, 2018 · 2 comments · Fixed by #531
Labels
solved The issue was fixed/resolved
Milestone

Comments

@htmldoug
Copy link

For https://github.com/lihaoyi/upickle/ (7d22de9 at time of writing), mill mill.scalalib.GenIdea/idea generates a definition of .idea/libraries/scala_library_2_11_12_jar.xml that does not include the compiler-classpath necessary for IntelliJ to be able to build the project. Attempting to run/build in IntelliJ project produces Error:scalac: No 'scala-compiler*.jar' in Scala compiler classpath in Scala SDK scala-library-2.11.12.jar.

The mill generated value of .idea/libraries/scala_library_2_11_12_jar.xml is:

<component name="libraryTable">
  <library name="scala-library-2.11.12.jar" type="Scala">
    <CLASSES>
      <root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12-sources.jar!/" />
    </SOURCES>
  </library>
</component>

IntelliJ builds work after manually adding libs to the compiler classpath:

<component name="libraryTable">
  <library name="scala-library-2.11.12.jar" type="Scala">
    <properties>
      <compiler-classpath>
        <root url="file://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.12/scala-compiler-2.11.12.jar" />
        <root url="file://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar" />
        <root url="file://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.5/scala-xml_2.11-1.0.5.jar" />
        <root url="file://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar" />
        <root url="file://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.12/scala-reflect-2.11.12.jar" />
      </compiler-classpath>
    </properties>
    <CLASSES>
      <root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12-sources.jar!/" />
    </SOURCES>
  </library>
</component>

Seems like mill mill.scalalib.GenIdea/idea should be modified to generate the compiler-classpath elements.

@tekumara
Copy link

tekumara commented Jan 5, 2019

I also experienced this. Thanks for the fix above.

@kascakm
Copy link

kascakm commented Jan 18, 2019

This was a blocker for our experimental project. Switched back to sbt.

@lefou lefou added this to the after 0.3.6 milestone Apr 18, 2019
@lefou lefou added the solved The issue was fixed/resolved label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved The issue was fixed/resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants