Skip to content

Commit

Permalink
Update sbt-lucuma and clue (#3673)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk authored Mar 19, 2024
1 parent 7d5481c commit 2a91156
Show file tree
Hide file tree
Showing 88 changed files with 131 additions and 131 deletions.
1 change: 1 addition & 0 deletions .scalafix-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
rules = [
OrganizeImports
]
OrganizeImports.targetDialect = Auto
2 changes: 1 addition & 1 deletion .scalafmt-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# this file by hand! Instead, if you wish to make changes, you should
# make a PR to sbt-lucuma.

version = "3.7.17"
version = "3.8.0"
style = default

runner.dialect = scala3
Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import org.scalajs.linker.interface.ModuleSplitStyle
import scala.sys.process.*
import Dependencies.*
import org.scalajs.linker.interface.ModuleSplitStyle

val reactJS = "17.0.2"
import scala.sys.process.*

ThisBuild / Test / bspEnabled := false
ThisBuild / ScalafixConfig / bspEnabled.withRank(KeyRanks.Invisible) := false
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/cache/CacheComponent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import cats.syntax.all.*
import crystal.react.hooks.*
import fs2.concurrent.SignallingRef
import japgolly.scalajs.react.*
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import japgolly.scalajs.react.vdom.html_<^.*

trait CacheComponent[S, P <: CacheComponent.Props[S]: Reusability]:
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/scala/explore/common/RetryHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package explore.common

import cats.Applicative
import org.typelevel.log4cats.Logger
import retry.*
import retry.RetryDetails.*
import retry.RetryPolicies.*
import retry.*

import java.{util => ju}
import java.util as ju
import scala.concurrent.duration.*

import ju.concurrent.TimeUnit
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/common/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package explore
import crystal.react.ReuseView
import crystal.react.reuse.Reuse
import explore.undo.UndoSetter
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import monocle.Lens
import monocle.Optional
import monocle.Prism
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import eu.timepit.refined.auto.*
import eu.timepit.refined.cats.*
import eu.timepit.refined.types.numeric.NonNegInt
import explore.model.enums.GridLayoutSection
import explore.model.layout.LayoutsMap
import explore.model.layout.*
import explore.model.layout.LayoutsMap
import lucuma.react.gridlayout.BreakpointName
import lucuma.react.gridlayout.Layout
import lucuma.react.gridlayout.LayoutItem
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/model/enums/SEDType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import lucuma.core.enums.StellarLibrarySpectrum
import lucuma.core.math.BrightnessUnits.*
import lucuma.core.math.FluxDensityContinuumValue
import lucuma.core.math.Wavelength
import lucuma.core.math.dimensional.Units.*
import lucuma.core.math.dimensional.*
import lucuma.core.math.dimensional.Units.*
import lucuma.core.math.units.*
import lucuma.core.model.SpectralDefinition
import lucuma.core.model.UnnormalizedSED
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/model/layout.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

package explore.model

import cats.Order.*
import cats.*
import cats.Order.*
import cats.syntax.all.*
import explore.model.enums.GridLayoutSection
import lucuma.react.gridlayout.*
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/scala/explore/undo/Action.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package explore.undo

import explore.optics.GetAdjust
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.{Sync => DefaultS}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import japgolly.scalajs.react.util.DefaultEffects.Sync as DefaultS
import monocle.Lens

/*
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/scala/explore/undo/UndoContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import cats.syntax.all.*
import crystal.*
import crystal.react.*
import japgolly.scalajs.react.*
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.{Sync => DefaultS}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import japgolly.scalajs.react.util.DefaultEffects.Sync as DefaultS

/*
* Combines a view of a model `M` and a view of `UndoStacks` over `M`.
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/scala/explore/undo/UndoSetter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package explore.undo

import crystal.react.*
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.{Sync => DefaultS}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import japgolly.scalajs.react.util.DefaultEffects.Sync as DefaultS
import monocle.Lens
import monocle.Optional
import monocle.Prism
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/undo/Undoer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package explore.undo

import japgolly.scalajs.react.util.DefaultEffects.{Sync => DefaultS}
import japgolly.scalajs.react.util.DefaultEffects.Sync as DefaultS

/** Undo controls */
trait Undoer:
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/scala/explore/utils/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package explore.utils
import cats.Applicative
import cats.Endo
import cats.Semigroup
import cats.effect.Temporal
import cats.effect.*
import cats.effect.Temporal
import cats.effect.syntax.all.*
import cats.syntax.all.*
import clue.data.*
Expand Down
4 changes: 2 additions & 2 deletions common/src/test/scala/explore/undo/TestUndoable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import cats.effect.std.Dispatcher
import crystal.react.View
import explore.optics.GetAdjust
import japgolly.scalajs.react.ReactCats.*
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA}
import japgolly.scalajs.react.util.DefaultEffects.{Sync => DefaultS}
import japgolly.scalajs.react.util.DefaultEffects.Async as DefaultA
import japgolly.scalajs.react.util.DefaultEffects.Sync as DefaultS
import org.typelevel.log4cats.Logger

class TestUndoable[M](
Expand Down
2 changes: 1 addition & 1 deletion common/src/test/scala/explore/undo/UndoContextSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import cats.effect.std.Dispatcher
import cats.kernel.Eq
import cats.syntax.all.*
import explore.data.KeyedIndexedList
import explore.data.tree.KeyedIndexedTree.Index
import explore.data.tree.*
import explore.data.tree.KeyedIndexedTree.Index
import explore.optics.Adjuster
import explore.optics.GetAdjust
import explore.undo.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package queries.common

import clue.GraphQLOperation
import clue.GraphQLSubquery
import clue.annotation.GraphQL
import explore.model.GroupElement
import explore.model.Grouping
import lucuma.schemas.ObservationDB
import clue.annotation.GraphQL
import lucuma.schemas.odb.TimeSpanSubquery

object GroupQueriesGQL:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package queries.common

import clue.GraphQLSubquery
import clue.annotation.GraphQL
import explore.model.ObsAttachment
import lucuma.schemas.ObservationDB
import clue.annotation.GraphQL

@GraphQL
object ObsAttachmentSubquery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
package queries.common

import clue.GraphQLSubquery
import clue.annotation.GraphQL
import explore.model.ObsSummary
import lucuma.schemas.ObservationDB
import lucuma.schemas.odb.*
import clue.annotation.GraphQL

@GraphQL
object ObservationSummarySubquery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package queries.common

import clue.GraphQLSubquery
import clue.annotation.GraphQL
import explore.model.ProgramInfo
import lucuma.schemas.ObservationDB
import clue.annotation.GraphQL

@GraphQL
object ProgramInfoSubquery extends GraphQLSubquery.Typed[ObservationDB, ProgramInfo]("Program"):
Expand Down
6 changes: 4 additions & 2 deletions explore/src/clue/scala/queries/common/ProgramQueriesGQL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import clue.GraphQLOperation
import clue.annotation.GraphQL
import lucuma.schemas.ObservationDB

import GroupQueriesGQL.*

object ProgramQueriesGQL {
@GraphQL
trait CreateProgramMutation extends GraphQLOperation[ObservationDB] {
Expand Down Expand Up @@ -50,7 +52,7 @@ object ProgramQueriesGQL {
val document: String = s"""#graphql
query ($$programId: ProgramId!) {
program(programId: $$programId) {
allGroupElements ${GroupQueriesGQL.GroupElementsSubQuery}
allGroupElements $GroupElementsSubQuery
}
}
"""
Expand All @@ -61,7 +63,7 @@ object ProgramQueriesGQL {
val document: String = s"""
subscription($$input: ProgramEditInput!) {
groupEdit(input: $$input) {
value ${GroupQueriesGQL.GroupSubQuery}
value $GroupSubQuery
editType
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package queries.common

import clue.GraphQLSubquery
import clue.annotation.GraphQL
import explore.model.ProposalAttachment
import lucuma.schemas.ObservationDB
import clue.annotation.GraphQL

@GraphQL
object ProposalAttachmentSubquery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package queries.common
import clue.GraphQLOperation
import clue.annotation.GraphQL
import lucuma.schemas.ObservationDB
import lucuma.schemas.model as schemasModel
import lucuma.schemas.odb.*
import lucuma.schemas.{model => schemasModel}
// gql: import lucuma.schemas.decoders.given

object TargetQueriesGQL {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package queries.common

import clue.GraphQLOperation
import clue.annotation.GraphQL
import queries.schemas.UserPreferencesDB
import explore.model.GlobalPreferences
import queries.schemas.UserPreferencesDB
// gql: import queries.schemas.UserPreferencesDB.given

object UserPreferencesQueriesGQL {
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/Explore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import clue.js.FetchMethod
import clue.js.WebSocketJSBackend
import clue.websocket.ReconnectionStrategy
import explore.components.ui.ExploreStyles
import explore.events.ExploreEvent
import explore.events.*
import explore.events.ExploreEvent
import explore.model.AppConfig
import explore.model.AppContext
import explore.model.ExploreLocalPreferences
Expand Down
4 changes: 2 additions & 2 deletions explore/src/main/scala/explore/ExploreLayout.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import explore.cache.ProgramCache
import explore.components.ui.ExploreStyles
import explore.events.ExploreEvent
import explore.events.ExploreEvent.LogoutEventId
import explore.model.AppContext
import explore.model.*
import explore.model.AppContext
import explore.model.enums.AppTab
import explore.programs.ProgramsPopup
import explore.shortcuts.*
import explore.shortcuts.given
import explore.utils.*
import japgolly.scalajs.react.React
import japgolly.scalajs.react.*
import japgolly.scalajs.react.React
import japgolly.scalajs.react.extra.router.ResolutionWithProps
import japgolly.scalajs.react.extra.router.SetRouteVia
import japgolly.scalajs.react.vdom.html_<^.*
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/RoleSwitch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package explore

import cats.effect.IO
import cats.syntax.all.*
import crystal.react.View
import crystal.react.*
import crystal.react.View
import japgolly.scalajs.react.*
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.StandardRole
Expand Down
4 changes: 2 additions & 2 deletions explore/src/main/scala/explore/Routing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import cats.data.NonEmptySet
import cats.syntax.all.*
import crystal.*
import crystal.react.View
import explore.model.*
import explore.model.Page
import explore.model.Page.*
import explore.model.*
import explore.proposal.ProposalTabContents
import explore.tabs.*
import explore.tabs.ConstraintsTabContents
import explore.tabs.ProgramTabContents
import explore.tabs.*
import explore.undo.UndoContext
import japgolly.scalajs.react.React
import japgolly.scalajs.react.ReactMonocle.*
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/TopBar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package explore

import cats.effect.IO
import cats.syntax.all.*
import crystal.react.View
import crystal.react.*
import crystal.react.View
import crystal.react.hooks.*
import explore.components.ConnectionsStatus
import explore.components.ui.ExploreStyles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ import explore.model.ObsAttachmentList
import explore.model.enums.AppTab
import explore.model.syntax.all.*
import explore.syntax.ui.*
import explore.utils.OdbRestClient
import explore.utils.*
import explore.utils.OdbRestClient
import fs2.dom
import japgolly.scalajs.react.Reusability
import japgolly.scalajs.react.*
import japgolly.scalajs.react.Reusability
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Observation
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.core.util.Enumerated
import lucuma.core.util.Timestamp
import lucuma.react.common.ReactFnProps
Expand All @@ -55,7 +55,7 @@ import lucuma.ui.reusability.given
import lucuma.ui.syntax.all.given
import lucuma.ui.table.*
import lucuma.ui.utils.*
import org.scalajs.dom.{File => DomFile}
import org.scalajs.dom.File as DomFile
import org.typelevel.log4cats.Logger

import scala.collection.immutable.SortedSet
Expand Down
6 changes: 3 additions & 3 deletions explore/src/main/scala/explore/attachments/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import explore.model.ObsAttachment
import explore.model.ObsAttachmentList
import explore.model.syntax.all.*
import explore.syntax.ui.*
import explore.utils.OdbRestClient
import explore.utils.*
import explore.utils.OdbRestClient
import fs2.dom
import japgolly.scalajs.react.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.core.util.Timestamp
import lucuma.react.primereact.Message
import lucuma.react.primereact.PrimeStyles
import lucuma.react.table.ColumnId
import lucuma.refined.*
import lucuma.schemas.enums.ObsAttachmentType
import lucuma.ui.primereact.LucumaPrimeStyles
import org.scalajs.dom.{File => DomFile}
import org.scalajs.dom.File as DomFile
import org.typelevel.log4cats.Logger

trait AttachmentUtils:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import monocle.Optional
import monocle.Traversal
import queries.common.ObsQueriesGQL.ProgramObservationsDelta.Data.ObservationEdit
import queries.common.ProgramQueriesGQL.GroupEditSubscription.Data.GroupEdit
import queries.common.ProgramQueriesGQL.ProgramEditAttachmentSubscription.Data.{
ProgramEdit => AttachmentProgramEdit
}
import queries.common.ProgramQueriesGQL.ProgramEditAttachmentSubscription.Data.ProgramEdit as AttachmentProgramEdit
import queries.common.ProgramQueriesGQL.ProgramInfoDelta.Data.ProgramEdit
import queries.common.TargetQueriesGQL.ProgramTargetsDelta.Data.TargetEdit

Expand Down
Loading

0 comments on commit 2a91156

Please sign in to comment.