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

Cleanup removing legacy scala.js libs and authentication code #502

Merged
merged 1 commit into from
Jan 10, 2024
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
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use flake
layout node
eval "$shellHook"
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
os: [ubuntu-latest]
scala: [3]
java: [temurin@17]
project: [rootJS, rootJVM]
project: [rootJVM]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -62,10 +62,6 @@ jobs:
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'

- name: scalaJSLink
if: matrix.project == 'rootJS'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult

- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ ensime.sbt
archive
smartgcal
.jvmopts
.direnv/
/jre

# Node modules
Expand Down
1 change: 0 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pull_request_rules:
- body~=labels:.*early-semver-patch
- body~=labels:.*early-semver-minor
- 'title=flake.lock: Update'
- status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJS)
- status-success=Build and Test (ubuntu-latest, 3, temurin@17, rootJVM)
actions:
merge: {}
Expand Down
31 changes: 6 additions & 25 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Settings.Libraries
import Settings.Plugins
import Common.*
import Settings.Libraries.*
import Settings.LibraryVersions
Expand Down Expand Up @@ -91,20 +90,13 @@ lazy val navigate_web_server = project
.settings(
name := "navigate_web_server",
libraryDependencies ++= Seq(
UnboundId,
JwtCore,
JwtCirce,
CommonsHttp,
Log4CatsNoop.value,
CatsEffect.value,
Log4Cats.value,
Http4sCirce,
BooPickle.value,
Http4sBoopickle,
GrackleRoutes,
Natchez,
LucumaSchemas,
JavaLocales.value
LucumaSchemas
) ++
Http4sClient ++ Http4s ++ PureConfig ++ Logging.value ++ MUnit.value ++ Grackle.value,
// Supports launching the server in the background
Expand All @@ -123,29 +115,18 @@ lazy val navigate_web_server = project
buildInfoPackage := "navigate.web.server"
)
.dependsOn(navigate_server)
.dependsOn(navigate_model.jvm % "compile->compile;test->test")
.dependsOn(navigate_model % "compile->compile;test->test")
.dependsOn(schema_util)

lazy val navigate_model = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Full)
lazy val navigate_model = project
.in(file("modules/model"))
.enablePlugins(GitBranchPrompt)
.settings(
libraryDependencies ++= Seq(
Squants.value,
Mouse.value,
BooPickle.value,
Http4sCore,
CatsTime.value
) ++ MUnit.value ++ Monocle.value ++ LucumaCore.value ++ Sttp.value ++ Circe.value
)
.jvmSettings(
commonSettings,
libraryDependencies += Http4sCore
)
.jsSettings(
// And add a custom one
libraryDependencies += JavaTimeJS.value,
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))
) ++ MUnit.value ++ Monocle.value ++ LucumaCore.value ++ Circe.value
)

lazy val schema_util = project
Expand All @@ -169,7 +150,7 @@ lazy val navigate_server = project
Log4Cats.value
) ++ MUnit.value ++ LucumaCore.value ++ Http4sClient
)
.dependsOn(navigate_model.jvm % "compile->compile;test->test")
.dependsOn(navigate_model % "compile->compile;test->test")
.dependsOn(epics)
.dependsOn(stateengine)

Expand Down
138 changes: 138 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
inputs = {
typelevel-nix.url = "github:typelevel/typelevel-nix";
nixpkgs.follows = "typelevel-nix/nixpkgs";
flake-utils.follows = "typelevel-nix/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, typelevel-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs-x86_64 = import nixpkgs {
system = "x86_64-darwin";
};
scala-cli-overlay = final: prev: {
scala-cli = pkgs-x86_64.scala-cli;
};
pkgs = import nixpkgs {
inherit system;
overlays = [ typelevel-nix.overlay scala-cli-overlay];
};
in
{
devShell = pkgs.devshell.mkShell {
imports = [ typelevel-nix.typelevelShell ];
packages = [
pkgs.nodePackages.vscode-langservers-extracted
pkgs.nodePackages.prettier
pkgs.websocat
];
typelevelShell = {
nodejs.enable = true;
jdk.package = pkgs.jdk17;
};
};
}
);
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package navigate.model
import cats.Eq
import cats.Order
import cats.syntax.all.*
import lucuma.core.model.User
import navigate.model.enums.ServerLogLevel
import navigate.model.security.UserDetails

import java.time.Instant

Expand All @@ -26,7 +26,7 @@ object NavigateEvent {
case object NullEvent extends NavigateEvent

case class ConnectionOpenEvent(
userDetails: Option[UserDetails],
userDetails: Option[User],
clientId: ClientId,
serverVersion: String
) extends NavigateEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ case class NavigateConfiguration(
site: Site,
mode: Mode,
navigateEngine: NavigateEngineConfiguration,
webServer: WebServerConfiguration,
authentication: AuthenticationConfig
webServer: WebServerConfiguration
)

object NavigateConfiguration {
given Eq[NavigateConfiguration] =
Eq.by(x => (x.site, x.mode, x.navigateEngine, x.webServer, x.authentication))
Eq.by(x => (x.site, x.mode, x.navigateEngine, x.webServer))
}
Loading