Skip to content

Commit

Permalink
Multi-ide 2.x Backports (#19312)
Browse files Browse the repository at this point in the history
* Daml ide multi ide (#17345)

* Multi-ide refactors (#18885)

* Reimplement ProgressToken prefixing to be stateless

* Refactor parsing logic to not use interleaveIO

* Move most verbose logging behind a flag

* Address reviews

* Multi-IDE Features for 2.9 (#19040)

* Implement dar unpacking

* Implement packageless IDE

* Hot-reloading logic for daml.yaml, multi-package.yaml, *.dar

* Implement initial error recovery logic

* Switch logging to log levels
Replace window reload with LanguageServer restart

* Forward args from multi-ide to sub-ides

* Change unpacked dar paths to be the unit-id.
Update unpacking logic to shutdown previous IDEs

* Remove broken experimental flag

* Refactor ide restart logic to not lose event handlers

* Log subIDE errors to debug logger live

* Windows fixes

* First review fixes batch

* Use newtypes for many FilePaths

* Address Dylan's comments

* Refactor how SubIDEs are passed around, reduce times it is dropped

* Update diagnostic

* Multi-ide structure change handling (#19194)

* Better support for package structure changes

* Rename some handlers

* Split up MultiIde.hs into many files (#19198)

* Split up MultiIde.hs into many files

* Further split SubIde

* Multi-IDE Sdk install managament (#19256)

* Tweaks from previous version

* Implement Sdk Version management

* Address review

* Fix compilation issues

* Fix issues with 2.x
  • Loading branch information
samuel-williams-da authored Jun 3, 2024
1 parent a67a449 commit ad262e6
Show file tree
Hide file tree
Showing 28 changed files with 3,602 additions and 86 deletions.
7 changes: 5 additions & 2 deletions sdk/bazel-haskell-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ load("@dadew//:dadew.bzl", "dadew_tool_home")
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
load("//bazel_tools/ghc-lib:repositories.bzl", "ghc_lib_and_dependencies")

GHCIDE_REV = "223e571d3cac214d131b85330bf09a1762e88671"
GHCIDE_SHA256 = "5604a0e30f6e0a2ca8b2d8f9883698d4c97efdcf7d84d27539d433a49d40cf74"
GHCIDE_REV = "96d92b9b5b5abea5e1d3df2ae06e26094d986139"
GHCIDE_SHA256 = "a1a4b9157f81491d9dc580b638fec61e42c6c1b44e30d7ceee8c38a57e308ab6"
GHCIDE_LOCAL_PATH = None
JS_JQUERY_VERSION = "3.3.1"
JS_DGTABLE_VERSION = "0.5.2"
Expand Down Expand Up @@ -55,6 +55,7 @@ haskell_cabal_library(
patch_args = ["-p1"],
patches = [
"@com_github_digital_asset_daml//bazel_tools:lsp-types-normalisation.patch",
"@com_github_digital_asset_daml//bazel_tools:lsp-types-expose-other-modules.patch",
],
sha256 = LSP_TYPES_SHA256,
strip_prefix = "lsp-types-{}".format(LSP_TYPES_VERSION),
Expand Down Expand Up @@ -463,6 +464,7 @@ exports_files(["stack.exe"], visibility = ["//visibility:public"])
"ansi-wl-pprint",
"array",
"async",
"attoparsec",
"base",
"base16-bytestring",
"base64",
Expand Down Expand Up @@ -549,6 +551,7 @@ exports_files(["stack.exe"], visibility = ["//visibility:public"])
"semigroupoids",
"semver",
"silently",
"some",
"sorted-list",
"split",
"stache",
Expand Down
20 changes: 20 additions & 0 deletions sdk/bazel_tools/lsp-types-expose-other-modules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/lsp-types.cabal b/lsp-types.cabal
index 1af6907..1443cc0 100644
--- a/lsp-types.cabal
+++ b/lsp-types.cabal
@@ -21,6 +21,7 @@ library
, Language.LSP.Types.Capabilities
, Language.LSP.Types.Lens
, Language.LSP.Types.SMethodMap
+ , Language.LSP.Types.Utils
, Language.LSP.VFS
, Data.IxMap
other-modules: Language.LSP.Types.CallHierarchy
@@ -63,7 +64,6 @@ library
, Language.LSP.Types.TextDocument
, Language.LSP.Types.TypeDefinition
, Language.LSP.Types.Uri
- , Language.LSP.Types.Utils
, Language.LSP.Types.Window
, Language.LSP.Types.WatchedFiles
, Language.LSP.Types.WorkspaceEdit
27 changes: 17 additions & 10 deletions sdk/compiler/daml-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"onLanguage:daml",
"onCommand:daml.openDamlDocs",
"onCommand:daml.resetTelemetryConsent",
"onCommand:daml.showResource"
"onCommand:daml.showResource",
"workspaceContains:daml.yaml"
],
"main": "./out/src/extension",
"contributes": {
Expand Down Expand Up @@ -78,15 +79,16 @@
"type": "object",
"title": "Daml Studio configuration",
"properties": {
"daml.debug": {
"type": "boolean",
"default": false,
"description": "Enable debug logging in the Daml Language Server."
},
"daml.experimental": {
"type": "boolean",
"default": false,
"description": "Enable experimental features in the IDE, this may break things"
"daml.logLevel": {
"enum": [
"Telemetry",
"Debug",
"Info",
"Warning",
"Error"
],
"default": "Warning",
"description": "Sets the logging threshold of the daml-ide and multi-ide"
},
"daml.profile": {
"type": "boolean",
Expand All @@ -111,6 +113,11 @@
"type": "string",
"default": "",
"description": "Extra arguments passed to `damlc ide`. This can be used to enable additional warnings via `--ghc-option -W`"
},
"daml.multiPackageIdeSupport": {
"type": "boolean",
"default": false,
"description": "EXPERIMENTAL: Enables the incomplete and experimental multi-ide feature."
}
}
},
Expand Down
Loading

0 comments on commit ad262e6

Please sign in to comment.