Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave authored Jun 13, 2024
1 parent 98fdb11 commit 0913c0c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Fable.Cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

* [All] Fixed Fable compiler hanging on some errors (#3842) (by @ncave)
* [JS/TS] Fixed DateTime.MinValue, DateTime.MaxValue (#3836) (by @ncave)

## 4.19.0 - 2024-06-10
Expand Down
2 changes: 1 addition & 1 deletion src/Fable.Cli/Entry.fs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ type Runner =

let startCompilation () =
State.Create(cliArgs, ?watchDelay = watchDelay, useMSBuildForCracking = useMSBuildForCracking)
|> startCompilation
|> startCompilationAsync
|> Async.RunSynchronously

return!
Expand Down
2 changes: 1 addition & 1 deletion src/Fable.Cli/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ let private compilationCycle (state: State) (changes: ISet<string>) =

type FileWatcherMsg = | Changes of timeStamp: DateTime * changes: ISet<string>

let startCompilation state =
let startCompilationAsync state =
async {
try
let state =
Expand Down
7 changes: 6 additions & 1 deletion src/Fable.Transforms/State.fs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ type ImplFile =

// add all entities to the entity cache
let entities = Dictionary()
let declarations = file.Declarations

let declarations =
try
file.Declarations // this may throw
with _ex ->
[]

FSharp2Fable.Compiler.getRootFSharpEntities declarations |> loop entities

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Compiler/Util/Compiler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module Compiler =

let result =
state
|> startCompilation
|> startCompilationAsync
|> Async.RunSynchronously

match result with
Expand Down

0 comments on commit 0913c0c

Please sign in to comment.