Skip to content

Commit

Permalink
Bump SBT and Scalafmt (#1203)
Browse files Browse the repository at this point in the history
Co-authored-by: Radosław Waśko <[email protected]>
Co-authored-by: Dmitry Bushev <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2020
1 parent 0740905 commit 746521f
Show file tree
Hide file tree
Showing 684 changed files with 4,958 additions and 7,145 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,6 @@ branches:
- "Rust Test Native (windows-latest)"
- "Rust Test WASM"
- "license/cla"
- "Vulnerability Scan"
# - "Vulnerability Scan" # CodeQL is temporarily disabled due to incompatibility
enforce_admins: null
restrictions: null
18 changes: 12 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
name: "CodeQL"

# CodeQL is temporarily disabled because it seems that it is unable to discover
# code compiled with SBT.
on:
push:
branches:
- main
- "release/*"
branches-ignore:
- "**"
# branches:
# - main
# - "release/*"
pull_request:
branches:
- "*"
branches-ignore:
- "**"
# branches:
# - "*"

env:
# Please ensure that this is in sync with graalVersion in build.sbt
graalVersion: 20.2.0
# Please ensure that this is in sync with javaVersion in build.sbt
javaVersion: 11
# Please ensure that this is in sync with project/build.properties
sbtVersion: 1.3.13
sbtVersion: 1.4.1
# Please ensure that this is in sync with rustVersion in build.sbt
rustToolchain: nightly-2019-11-04

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
# Please ensure that this is in sync with javaVersion in build.sbt
javaVersion: 11
# Please ensure that this is in sync with project/build.properties
sbtVersion: 1.3.13
sbtVersion: 1.4.1
# Please ensure that this is in sync with rustVersion in build.sbt
rustToolchain: nightly-2019-11-04

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
# Please ensure that this is in sync with javaVersion in build.sbt
javaVersion: 11
# Please ensure that this is in sync with project/build.properties
sbtVersion: 1.3.13
sbtVersion: 1.4.1
# Please ensure that this is in sync with rustVersion in build.sbt
rustToolchain: nightly-2019-11-04
excludedPaths: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ bench-report.xml

.editorconfig
.bloop/
.bsp/

#################
## Build Cache ##
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// All Scala files should be reformatted through this formatter before being
// committed to the repositories.

version = "2.6.2"
version = "2.7.4"

// Wrapping and Alignment
align = most
Expand Down
635 changes: 318 additions & 317 deletions build.sbt

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions engine/language-server/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level [%-15thread] %-36logger{36} %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level [%-15thread] %-36logger{36} %msg%n</pattern>
</encoder>
</appender>

<logger name="org.enso" level="TRACE"/>
<logger name="org.enso" level="TRACE"/>

<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import org.enso.languageserver.runtime.RuntimeKiller.{
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}

/**
* A lifecycle component used to start and stop a Language Server.
/** A lifecycle component used to start and stop a Language Server.
*
* @param config a LS config
*/
Expand Down Expand Up @@ -124,16 +123,15 @@ class LanguageServerComponent(config: LanguageServerConfig)
_ <- start()
} yield ComponentRestarted

private val logError: PartialFunction[Throwable, Unit] = {
case th => logger.error("An error occurred during stopping server", th)
private val logError: PartialFunction[Throwable, Unit] = { case th =>
logger.error("An error occurred during stopping server", th)
}

}

object LanguageServerComponent {

/**
* A running server context.
/** A running server context.
*
* @param mainModule a main module containing all components of the server
* @param jsonBinding a http binding for rpc protocol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import java.util.UUID

import scala.concurrent.ExecutionContext

/**
* The config of the running Language Server instance.
/** The config of the running Language Server instance.
*
* @param interface a interface that the server listen to
* @param rpcPort a rpc port that the server listen to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,23 @@ import org.enso.languageserver.boot.LifecycleComponent.{

import scala.concurrent.Future

/**
* An abstraction for components that can be started and stopped.
/** An abstraction for components that can be started and stopped.
*/
trait LifecycleComponent {

/**
* Starts asynchronously a server.
/** Starts asynchronously a server.
*
* @return a notice that the server started successfully
*/
def start(): Future[ComponentStarted.type]

/**
* Stops asynchronously a server.
/** Stops asynchronously a server.
*
* @return a notice that the server stopped successfully
*/
def stop(): Future[ComponentStopped.type]

/**
* Restarts asynchronously a server.
/** Restarts asynchronously a server.
*
* @return a notice that the server restarted successfully
*/
Expand All @@ -38,18 +34,15 @@ trait LifecycleComponent {

object LifecycleComponent {

/**
* Signals that component was started.
/** Signals that component was started.
*/
case object ComponentStarted

/**
* Signals that component was stopped.
/** Signals that component was stopped.
*/
case object ComponentStopped

/**
* Signals that component was restarted.
/** Signals that component was restarted.
*/
case object ComponentRestarted

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ import scala.concurrent.Future
import scala.concurrent.duration._
import scala.util.{Failure, Success}

/**
* A main module containing all components of the server.
/** A main module containing all components of the server.
*
* @param serverConfig configuration for the language server
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.enso.languageserver.capability
import org.enso.languageserver.data.CapabilityRegistration
import org.enso.jsonrpc.{Error, HasParams, HasResult, Method, Unused}

/**
* The capability JSON RPC API provided by the language server.
/** The capability JSON RPC API provided by the language server.
* See [[https://github.com/enso-org/enso/blob/main/docs/language-server/README.md]]
* for message specifications.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import org.enso.languageserver.session.JsonSession

object CapabilityProtocol {

/**
* Requests the Language Server grant a new capability to a client.
/** Requests the Language Server grant a new capability to a client.
*
* @param rpcSession the client to grant the capability to.
* @param registration the capability to grant.
Expand All @@ -17,31 +16,26 @@ object CapabilityProtocol {
registration: CapabilityRegistration
)

/**
* Signals capability acquisition status.
/** Signals capability acquisition status.
*/
sealed trait AcquireCapabilityResponse

/**
* Confirms client that capability has been acquired.
/** Confirms client that capability has been acquired.
*/
case object CapabilityAcquired extends AcquireCapabilityResponse

/**
* Signals that capability acquisition request cannot be processed.
/** Signals that capability acquisition request cannot be processed.
*/
case object CapabilityAcquisitionBadRequest extends AcquireCapabilityResponse

/**
* Signals about capability acquisition error.
/** Signals about capability acquisition error.
*
* @param error file system failure
*/
case class CapabilityAcquisitionFileSystemFailure(error: FileSystemFailure)
extends AcquireCapabilityResponse

/**
* Notifies the Language Server about a client releasing a capability.
/** Notifies the Language Server about a client releasing a capability.
*
* @param rpcSession the client releasing the capability.
* @param capability the capability being released.
Expand All @@ -51,36 +45,30 @@ object CapabilityProtocol {
capability: CapabilityRegistration
)

/**
* Signals capability release status.
/** Signals capability release status.
*/
sealed trait ReleaseCapabilityResponse

/**
* Confirms client that capability has been released.
/** Confirms client that capability has been released.
*/
case object CapabilityReleased extends ReleaseCapabilityResponse

/**
* Signals that capability release request cannot be processed.
/** Signals that capability release request cannot be processed.
*/
case object CapabilityReleaseBadRequest extends ReleaseCapabilityResponse

/**
* Signals that requested capability is not acquired.
/** Signals that requested capability is not acquired.
*/
case object CapabilityNotAcquiredResponse extends ReleaseCapabilityResponse

/**
* A notification sent by the Language Server, notifying a client about
/** A notification sent by the Language Server, notifying a client about
* a capability being taken away from them.
*
* @param capability the capability being released.
*/
case class CapabilityForceReleased(capability: CapabilityRegistration)

/**
* A notification sent by the Language Server, notifying a client about a new
/** A notification sent by the Language Server, notifying a client about a new
* capability being granted to them.
*
* @param registration the capability being granted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import org.enso.languageserver.data.{
import org.enso.languageserver.monitoring.MonitoringProtocol.{Ping, Pong}
import org.enso.languageserver.util.UnhandledLogging

/**
* A content based router that routes each capability request to the
/** A content based router that routes each capability request to the
* correct recipient based on the capability object.
*
* @param bufferRegistry the recipient of buffer capability requests
Expand Down Expand Up @@ -71,8 +70,7 @@ class CapabilityRouter(

object CapabilityRouter {

/**
* Creates a configuration object used to create a [[CapabilityRouter]]
/** Creates a configuration object used to create a [[CapabilityRouter]]
*
* @param bufferRegistry a buffer registry ref
* @param receivesTreeUpdatesHandler the recipient of `receivesTreeUpdates`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import io.circe._
import org.enso.languageserver.filemanager.Path
import org.enso.languageserver.runtime.ExecutionApi.ContextId

/**
* A superclass for all capabilities in the system.
/** A superclass for all capabilities in the system.
* @param method method name used to identify the capability.
*/
sealed abstract class Capability(val method: String)

//TODO[MK]: Migrate to actual Path, once it is implemented.
/**
* A capability allowing the user to modify a given file.
/** A capability allowing the user to modify a given file.
* @param path the file path this capability is granted for.
*/
case class CanEdit(path: Path) extends Capability(CanEdit.methodName)
Expand All @@ -22,8 +20,7 @@ object CanEdit {
val methodName = "text/canEdit"
}

/**
* A capability allowing user to receive file events.
/** A capability allowing user to receive file events.
*
* @param path path to watch.
*/
Expand All @@ -34,8 +31,7 @@ object ReceivesTreeUpdates {
val methodName = "file/receivesTreeUpdates"
}

/**
* A capability allowing user to modify the execution context.
/** A capability allowing user to modify the execution context.
*
* @param contextId identifier of an execution conatext
*/
Expand All @@ -46,8 +42,7 @@ object CanModify {
val methodName = "executionContext/canModify"
}

/**
* A capability allowing user to receive events from the execution context.
/** A capability allowing user to receive events from the execution context.
*
* @param contextId identifier of an execution conatext
*/
Expand Down Expand Up @@ -79,8 +74,7 @@ object ReceivesSuggestionsDatabaseUpdates {
val methodName = "search/receivesSuggestionsDatabaseUpdates"
}

/**
* A capability registration object, used to identify acquired capabilities.
/** A capability registration object, used to identify acquired capabilities.
*
* @param capability the registered capability.
*/
Expand Down
Loading

0 comments on commit 746521f

Please sign in to comment.