File tree 5 files changed +32
-11
lines changed
5 files changed +32
-11
lines changed Original file line number Diff line number Diff line change 12
12
13
13
## master
14
14
15
+ #### :bug : Bug Fix
16
+
17
+ - Fix a regression with incremental typechecking in monorepos with rewatch, where the workspace directory was not properly set.
18
+
19
+ #### :bug : Bug Fix
20
+
21
+ - When log files are deleted (due to a clean), the editor tooling doesn't crash anymore
22
+
23
+ #### :rocket : New Feature
24
+
25
+ - Support for the ` namespace-entry ` feature of rewatch, to allow entrypoint modules for namespaced packages.
26
+
15
27
## 1.54.0
16
28
17
29
#### :nail_care : Polish
Original file line number Diff line number Diff line change @@ -95,14 +95,18 @@ let nameSpaceToName n =
95
95
96
96
let getNamespace config =
97
97
let ns = config |> Json. get " namespace" in
98
+ let namespaceEntry = config |> Json. get " namespace-entry" in
98
99
let fromString = ns |> bind Json. string in
99
100
let isNamespaced =
100
101
ns |> bind Json. bool |> Option. value ~default: (fromString |> Option. is_some)
101
102
in
102
103
let either x y = if x = None then y else x in
103
104
if isNamespaced then
104
105
let fromName = config |> Json. get " name" |> bind Json. string in
105
- either fromString fromName |> Option. map nameSpaceToName
106
+ let name = either fromString fromName |> Option. map nameSpaceToName in
107
+ match (namespaceEntry, name) with
108
+ | Some _ , Some name -> Some (" @" ^ name)
109
+ | _ -> name
106
110
else None
107
111
108
112
module StringSet = Set. Make (String )
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ function triggerIncrementalCompilationOfFile(
376
376
return ;
377
377
}
378
378
const workspaceRootPath = projectRootPath
379
- ? utils . findProjectRootOfFile ( projectRootPath )
379
+ ? utils . findProjectRootOfFile ( projectRootPath , true )
380
380
: null ;
381
381
382
382
const bscBinaryLocation = project . bscBinaryLocation ;
Original file line number Diff line number Diff line change @@ -227,13 +227,17 @@ let compilerLogsWatcher = chokidar
227
227
}
228
228
}
229
229
} else {
230
- sendUpdatedDiagnostics ( ) ;
231
- sendCompilationFinishedMessage ( ) ;
232
- if ( config . extensionConfiguration . inlayHints ?. enable === true ) {
233
- sendInlayHintsRefresh ( ) ;
234
- }
235
- if ( config . extensionConfiguration . codeLens === true ) {
236
- sendCodeLensRefresh ( ) ;
230
+ try {
231
+ sendUpdatedDiagnostics ( ) ;
232
+ sendCompilationFinishedMessage ( ) ;
233
+ if ( config . extensionConfiguration . inlayHints ?. enable === true ) {
234
+ sendInlayHintsRefresh ( ) ;
235
+ }
236
+ if ( config . extensionConfiguration . codeLens === true ) {
237
+ sendCodeLensRefresh ( ) ;
238
+ }
239
+ } catch {
240
+ console . log ( "Error while sending updated diagnostics" ) ;
237
241
}
238
242
}
239
243
} ) ;
Original file line number Diff line number Diff line change @@ -47,13 +47,14 @@ let findProjectRootOfFileInDir = (
47
47
// TODO: races here?
48
48
// TODO: this doesn't handle file:/// scheme
49
49
export let findProjectRootOfFile = (
50
- source : p . DocumentUri
50
+ source : p . DocumentUri ,
51
+ skipParent ?: boolean
51
52
) : null | p . DocumentUri => {
52
53
// First look in project files
53
54
let foundRootFromProjectFiles : string | null = null ;
54
55
55
56
for ( const rootPath of projectsFiles . keys ( ) ) {
56
- if ( source . startsWith ( rootPath ) ) {
57
+ if ( source . startsWith ( rootPath ) && ( ! skipParent || source !== rootPath ) ) {
57
58
// Prefer the longest path (most nested)
58
59
if (
59
60
foundRootFromProjectFiles == null ||
You can’t perform that action at this time.
0 commit comments