-
Notifications
You must be signed in to change notification settings - Fork 333
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
Better support for mill BSP #3308
Conversation
@@ -334,7 +328,3 @@ class BspConnector( | |||
} | |||
} | |||
} | |||
|
|||
object BspConnector { | |||
final val BLOOP_SELECTED = "BLOOP" |
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.
I realized we probably don't even need this, so I ripped it out of all the places and now just use Bloop
from BloopServers.name
. It simplifies it a bit.
@@ -282,14 +281,8 @@ class BspConnector( | |||
args => bspConfigGenerator.runUnconditionally(buildTool, args) | |||
) | |||
.map(status => handleGenerationStatus(buildTool, status)) | |||
case Right(connectionDetails) |
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.
I think this may have been what @dos65 was hinting at in my previous pr, but I realized this also isn't needed here.
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.
Yep, that's it!
this.major > that.major || | ||
(this.major == that.major && this.minor > that.minor) || | ||
(this.major == that.major && this.minor == that.minor && this.patch > that.patch) || | ||
// 3.0.0-RC1 > 3.0.0-M1 | ||
this.releaseCandidate.isDefined && that.milestone.isDefined || | ||
baseVersionEqual && this.releaseCandidate.isDefined && that.milestone.isDefined || |
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.
So I realized the logic here was missing a bit since previously it was showing that SemVer.isCompatibleVersion("0.10.0-M4", "0.9.10")
was true since it wasn't correctly handling the cases where there was a major/minor/patch different plus one was a milestone or release candidate. You. can see what I mean more clearly in the tests I added for this.
26bea0c
to
d6c914c
Compare
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.
LGTM! I have a very tiny, tiny comment - also thinking that we don't actually use those suite names and maybe we should remove them?
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.
LGTM!
This adds the same type of functionality that we have with sbt where Mill can now also be a build server meaning that
metals.generate-bsp-config
and alsometals.bsp-switch
will apply to it. This also cleans up a few things that I did in #3304, fixes a bug inSemver
, and also introduces a few small changes inBuildServerProvider.scala
that are needed if a build tool and the name they use as a build server don't match.Relates to com-lihaoyi/mill#1546 and also closes #3307