-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Small improvements to Idea project generation #616
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
308d562
Fixes https://github.com/lihaoyi/mill/issues/532
e2b1691
Using Task.sequence instead of multiple evals
ea1202f
Fixes generation of fake SBT libraries
3008b55
Simple fix for https://github.com/lihaoyi/mill/issues/527
9626e43
Fixes 'file name too long' error
03e37da
Using coursier for reading poms instead of ad-hoc xml parsing
05d1d40
It seems that simply using the provided evaluator fixes https://githu…
85dd96a
Added back the usage of module-defined repos for resolving mill libra…
37b4e93
Changed GenIdeaTests to use ScriptTestSuite
0c46108
Using mill source path instead of pwd
6b80cfa
Update logic to check for Scala libraries when generating fake SBT li…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import mill.scalalib | ||
|
||
trait HelloWorldModule extends scalalib.ScalaModule { | ||
def scalaVersion = "2.12.4" | ||
object test extends super.Tests { | ||
def testFrameworks = Seq("utest.runner.Framework") | ||
} | ||
} | ||
|
||
object HelloWorld extends HelloWorldModule |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.iml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager"> | ||
<output url="file://$MODULE_DIR$/../out/HelloWorld/compile/dest/classes"/> | ||
<exclude-output/> | ||
<content url="file://$MODULE_DIR$/../out/HelloWorld/generatedSources/dest"/> | ||
<content url="file://$MODULE_DIR$/../HelloWorld"> | ||
<sourceFolder url="file://$MODULE_DIR$/../HelloWorld/src" isTestSource="false"/> | ||
<sourceFolder url="file://$MODULE_DIR$/../HelloWorld/resources" type="java-resource"/> | ||
<excludeFolder url="file://$MODULE_DIR$/../HelloWorld/target"/> | ||
</content> | ||
<orderEntry type="inheritedJdk"/> | ||
<orderEntry type="sourceFolder" forTests="false"/> | ||
<orderEntry type="library" name="scala-sdk-2.12.4" level="application"/> | ||
<orderEntry type="library" name="scala-library-2.12.4-sources.jar" level="project"/> | ||
<orderEntry type="library" name="scala-library-2.12.4.jar" level="project"/> | ||
</component> | ||
</module> |
18 changes: 18 additions & 0 deletions
18
scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.test.iml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager"> | ||
<output-test url="file://$MODULE_DIR$/../out/HelloWorld/test/compile/dest/classes"/> | ||
<exclude-output/> | ||
<content url="file://$MODULE_DIR$/../out/HelloWorld/test/generatedSources/dest"/> | ||
<content url="file://$MODULE_DIR$/../HelloWorld/test"> | ||
<sourceFolder url="file://$MODULE_DIR$/../HelloWorld/test/src" isTestSource="true"/> | ||
<sourceFolder url="file://$MODULE_DIR$/../HelloWorld/test/resources" type="java-test-resource"/> | ||
<excludeFolder url="file://$MODULE_DIR$/../HelloWorld/test/target"/> | ||
</content> | ||
<orderEntry type="inheritedJdk"/> | ||
<orderEntry type="sourceFolder" forTests="false"/> | ||
<orderEntry type="library" name="scala-sdk-2.12.4" level="application"/> | ||
<orderEntry type="library" name="scala-library-2.12.4-sources.jar" level="project"/> | ||
<orderEntry type="library" name="scala-library-2.12.4.jar" level="project"/> | ||
<orderEntry type="module" module-name="helloworld" exported=""/> | ||
</component> | ||
</module> |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment what is and why it is happening here? Shouldn't the
val
be namedartifactWithoutScalaVersion
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget about the suggested val name, I misread.
My concern is primary the explicit versions. What about 2.13?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't like it anymore than you do
The naming that Idea expects is very strange. I will add some examples/tests in order to clarify.
I ended up the writing the code that checks for the Scala version suffix that way because it mimics the way that the Idea Scala Plugin actually does it. I think it was a bad decision.
About appending "_2.12", Idea expects the version to match mill's version of Scala. I wanted to use the BuildInfo plugin for that, but I am not sure if mill itself is using it. I saw the version already hardcoded in the code, so I went with it. I will try to use the BuildInfo plugin instead.