Skip to content
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

Update compiler settings #474

Merged
merged 1 commit into from
Feb 14, 2018
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ package object engine {
case Unload(id) => Logger.debug("Engine: Sequence unloaded") *> unload(id)
case Breakpoint(id, _, step, v) => Logger.debug(s"Engine: breakpoint changed for step $step to $v") *> modifyS(id)(_.setBreakpoint(step, v))
case SkipMark(id, _, step, v) => Logger.debug(s"Engine: skip mark changed for step $step to $v") *> modifyS(id)(_.setSkipMark(step, v))
case SetOperator(name, user) => Logger.debug(s"Engine: Setting Operator name to '$name' by ${ue.username}") *> setOperator(name)
case SetObserver(id, user, name) => Logger.debug(s"Engine: Setting Observer for observation $id to '$name' by ${ue.username}") *> setObserver(id)(name)
case SetConditions(conds, user) => Logger.debug("Engine: Setting conditions") *> setConditions(conds)
case SetImageQuality(iq, user) => Logger.debug("Engine: Setting image quality") *> setImageQuality(iq)
case SetWaterVapor(wv, user) => Logger.debug("Engine: Setting water vapor") *> setWaterVapor(wv)
case SetSkyBackground(sb, user) => Logger.debug("Engine: Setting sky background") *> setSkyBackground(sb)
case SetCloudCover(cc, user) => Logger.debug("Engine: Setting cloud cover") *> setCloudCover(cc)
case SetOperator(name, _) => Logger.debug(s"Engine: Setting Operator name to '$name' by ${ue.username}") *> setOperator(name)
case SetObserver(id, _, name) => Logger.debug(s"Engine: Setting Observer for observation $id to '$name' by ${ue.username}") *> setObserver(id)(name)
case SetConditions(conds, _) => Logger.debug("Engine: Setting conditions") *> setConditions(conds)
case SetImageQuality(iq, _) => Logger.debug("Engine: Setting image quality") *> setImageQuality(iq)
case SetWaterVapor(wv, _) => Logger.debug("Engine: Setting water vapor") *> setWaterVapor(wv)
case SetSkyBackground(sb, _) => Logger.debug("Engine: Setting sky background") *> setSkyBackground(sb)
case SetCloudCover(cc, _) => Logger.debug("Engine: Setting cloud cover") *> setCloudCover(cc)
case Poll => Logger.debug("Engine: Polling current state")
case GetState(f) => getState(f)
case GetSeqState(id, f) => getSeqState(id, f)
Expand All @@ -408,8 +408,8 @@ package object engine {
case PartialResult(id, i, r) => Logger.debug("Engine: Partial result") *> partialResult(id, i, r)
case Paused(id, i, r) => Logger.debug("Engine: Action paused") *> actionPause(id, i, r)
case Failed(id, i, e) => logError(e) *> fail(id)(i, e)
case Busy(id) => Logger.warning("Cannot run sequence %id because required systems are in use.")
case BreakpointReached(id) => Logger.debug("Engine: Breakpoint reached")
case Busy(id) => Logger.warning(s"Cannot run sequence $id because required systems are in use.")
case BreakpointReached(_) => Logger.debug("Engine: Breakpoint reached")
case Executed(id) => Logger.debug("Engine: Execution completed") *> next(id)
case Executing(id) => Logger.debug("Engine: Executing") *> execute(id)
case Finished(id) => Logger.debug("Engine: Finished") *> switch(id)(SequenceState.Completed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ class SeqexecEngine(settings: SeqexecEngine.Settings) {
case engine.GetState(_) => NullEvent
case engine.GetSeqState(_, _) => NullEvent
case engine.ActionStop(_, _) => ActionStopRequested(svs)
case engine.LogDebug(msg) => NullEvent
case engine.LogInfo(msg) => NullEvent
case engine.LogWarning(msg) => NullEvent
case engine.LogError(msg) => NullEvent
case engine.LogDebug(_) => NullEvent
case engine.LogInfo(_) => NullEvent
case engine.LogWarning(_) => NullEvent
case engine.LogError(_) => NullEvent
case engine.ActionResume(_, _, _) => SequenceUpdated(svs)
}
case engine.EventSystem(se) => se match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ConfigUtilSpec extends FlatSpec with Matchers with EitherValues with Prope
forAll { (c: Config, k: ItemKey) =>
c.putItem(k, "value")
c.extract(k).as[Int].toEither.left.value should matchPattern {
case ConversionError(k,_) =>
case ConversionError(_, _) =>
}
}
}
Expand All @@ -66,7 +66,7 @@ class ConfigUtilSpec extends FlatSpec with Matchers with EitherValues with Prope
// Make sure the key is removed
c.remove(k)
c.extract(k).as[String].toEither.left.value should matchPattern {
case KeyNotFound(k) =>
case KeyNotFound(_) =>
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object LoginBox {
SeqexecWebClient.login(s.username, s.password)
.map(loggedInEvent)
.recover {
case t: Exception => updateErrorMsg("Login failed, check username/password")
case _: Exception => updateErrorMsg("Login failed, check username/password")
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ object StepProgressCell {

def stepDisplay(props: Props): VdomElement =
(props.focus.state, props.step) match {
case (f, StandardStep(_, _, s @ StepState.Running, _, _, _, _, _)) if f.userStopRequested =>
case (f, StandardStep(_, _, StepState.Running, _, _, _, _, _)) if f.userStopRequested =>
// Case pause at the sequence level
stepObservationPausing(props)
case (_, s @ StandardStep(_, _, StepState.Running, _, _, None, _, _)) =>
case (_, s @ StandardStep(_, _, StepState.Running, _, _, None, _, _)) =>
// Case configuring, label and status icons
stepSystemsStatus(s)
case (f, s) if s.isObservePaused =>
case (_, s) if s.isObservePaused =>
// Case for exposure paused, label and control buttons
stepObservationStatus(props)
case (f, StandardStep(_, _, StepState.Running, _, _, Some(fileId), _, _)) =>
case (_, StandardStep(_, _, StepState.Running, _, _, Some(fileId), _, _)) =>
// Case for a exposure onging, progress bar and control buttons
stepObservationStatusAndFile(props, fileId)
case (_, s) if s.wasSkipped =>
case (_, s) if s.wasSkipped =>
<.p("Skipped")
case (_, _) if props.step.skip =>
case (_, _) if props.step.skip =>
<.p("Skip")
case (_, _) =>
case (_, _) =>
<.p(SeqexecStyles.componentLabel, props.step.shows)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ object handlers {
value match {
case InstrumentPage(i, Some(id)) if i === s.metadata.instrument && id === s.id =>
effectOnly(Effect(Future(SelectIdToDisplay(s.id))))
case InstrumentPage(i, None) =>
case InstrumentPage(_, None) =>
effectOnly(Effect(Future(SelectIdToDisplay(s.id))))
case SequenceConfigPage(i, id, step) if i === s.metadata.instrument && id === s.id =>
effectOnly(Effect(Future(ShowStep(s.id, step))))
Expand Down Expand Up @@ -445,7 +445,7 @@ object handlers {
}

def connectionErrorHandler: PartialFunction[Any, ActionResult[M]] = {
case ConnectionError(e) =>
case ConnectionError(_) =>
effectOnly(Effect.action(AppendToLog(ServerLogMessage(ServerLogLevel.ERROR, Instant.now, "Error connecting to the seqexec server"))))
}

Expand Down Expand Up @@ -550,7 +550,7 @@ object handlers {
}

val resourceBusyMessage: PartialFunction[Any, ActionResult[M]] = {
case ServerMessage(ResourcesBusy(id, sv)) =>
case ServerMessage(ResourcesBusy(id, _)) =>
val setConflictE = Effect(Future(SequenceInConflict(id)))
val openBoxE = Effect(Future(OpenResourcesBox))
effectOnly(setConflictE >> openBoxE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FreeLDAPAuthenticationServiceSpec extends FlatSpec with Matchers with Prop
fa match {
case LdapOp.AuthenticateOp(u, p) => db.authenticate(u, p)
case LdapOp.UserDisplayNameOp(uid) => db.displayName(uid)
case LdapOp.DisplayNameGrpThumbOp(uid) => ("", Nil, None)
case LdapOp.DisplayNameGrpThumbOp(_) => ("", Nil, None)
}
}

Expand Down
2 changes: 1 addition & 1 deletion project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object Settings {
"-Ywarn-unused:imports", // Warn if an import selector is not referenced.
"-Ywarn-unused:locals", // Warn if a local definition is unused.
"-Ywarn-unused:params", // Warn if a value parameter is unused.
// "-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
"-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
"-Ywarn-unused:privates", // Warn if a private member is unused.
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused.
"-Yinduction-heuristics", // speeds up the compilation of inductive implicit resolution
Expand Down