-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Conversation
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.
Thanks for fixing the issues. How do you tested it? Do you have any example or public projects you tried? Would be great if we could add them as test cases. Also, do you plan to continue to work on this, or why is this PR marked as Draft?
|
||
// The scala version here is non incidental | ||
s"SBT: $groupId:$artifactId:$version:jar" | ||
val artifactWithScalaVersion = artifactId.substring(artifactId.length - 5) match { |
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 named artifactWithoutScalaVersion
?
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.
I marked this PR as draft because I want it to have some kind of testing .and because I found myself adding more commits all the time (and because I wanted to test the github feature :D). Usually, I test manually with an example per issue, with mill itself, and with the projects my organization is using mill on. |
I modified the current |
@andres-pipicello-olx the intellij idea script doesn't really have that great coverage, so I honestly wouldn't mind "seems to work on my repos" as an acceptable test plan |
Sorry, I have no explicit pointers about testing this, besides GenIdeaTests, which you already mentioned. But if you want to test more complex cases, in principle, we could just call out to a sub process with complex enough mock project and check the expected outcome. But, as @lihaoyi already said, we can just merge now, if it works for you. But you have to change the draft status before we can merge. |
Ok, I marked the PR as ready |
Finally, I was able to convince Travis to build without errors (after lots of restarts, https://travis-ci.org/lefou/mill/builds/551179779), so I guess we're fine to merge. (We really need to fix the unreliable travis setup.) |
I'm going to keep each commit to keep the various bug fixes separated. |
Thanks for your contribution! |
Improves the resolution of
import $ivy
magics