Skip to content

Try get rid of CompletableFuture start using TaskApp #2680

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ lazy val backend = project
Dependencies.libraryManagement,
Dependencies.sourcecode,
Dependencies.monix,
Dependencies.monixTest,
Dependencies.directoryWatcher,
Dependencies.zt,
Dependencies.brave,
Expand Down Expand Up @@ -156,6 +157,7 @@ lazy val frontend: Project = project
Dependencies.jsoniterMacros % Provided,
Dependencies.scalazCore,
Dependencies.monix,
Dependencies.monixTest,
Dependencies.caseApp,
Dependencies.scalaDebugAdapter,
Dependencies.bloopConfig,
Expand Down
12 changes: 2 additions & 10 deletions frontend/src/main/scala/bloop/Bloop.scala
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
package bloop

import scala.annotation.tailrec

import bloop.cli.CliOptions
import bloop.cli.Commands
import bloop.cli.ExitStatus
import bloop.data.ClientInfo
import bloop.data.WorkspaceSettings
import bloop.engine.Build
import bloop.engine.BuildLoader
import bloop.engine.Exit
import bloop.engine.Interpreter
import bloop.engine.NoPool
import bloop.engine.Run
import bloop.engine.State
import bloop.engine.{Build, BuildLoader, ExecutionContext, Exit, Interpreter, NoPool, Run, State}
import bloop.io.AbsolutePath
import bloop.logging.BloopLogger

import _root_.bloop.task.Task
import caseapp.CaseApp
import caseapp.RemainingArgs
Expand Down Expand Up @@ -50,7 +42,7 @@ object Bloop extends CaseApp[CliOptions] {
// Ignore the exit status here, all we want is the task to finish execution or fail.
Cli.waitUntilEndOfWorld(options, state.pool, config, state.logger) {
t.map(s => { State.stateCache.updateBuild(s.copy(status = ExitStatus.Ok)); s.status })
}
}(ExecutionContext.ioScheduler)

// Recover the state if the previous task has been successful.
State.stateCache
Expand Down
Loading
Loading