Skip to content

Commit

Permalink
Merge pull request #2694 from fsprojects/release/next
Browse files Browse the repository at this point in the history
`5.23.0` release
  • Loading branch information
yazeedobaid authored Aug 1, 2022
2 parents 89e4d9c + c026863 commit 517659c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 5.23.0 - 2022-08-01
* ENHANCEMENT: Fake.Core.Process: stop using old ref-cell operators, thanks @knocte - https://github.com/fsprojects/FAKE/pull/2674
* BUGFIX: Fixes #2600, thanks @yazeedobaid - https://github.com/fsprojects/FAKE/issues/2600

## 5.23.0-alpha002 - 2022-07-22
* ENHANCEMENT: GitHubCI: stop restricting build+test jobs to release/next branch, thanks @knocte - https://github.com/fsprojects/FAKE/pull/2673
* BUGFIX: Fix getLastTag, thanks @akhansari - https://github.com/fsprojects/FAKE/issues/2677
Expand Down
20 changes: 10 additions & 10 deletions src/app/Fake.Core.Process/InternalStreams.fs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ module internal InternalStreams =
let asyncResult = ref null
Async.FromBeginEnd(
(fun (callback, state) ->
asyncResult := beginAction(callback, state)
!asyncResult),
asyncResult.Value <- beginAction(callback, state)
asyncResult.Value),
(fun res ->
endAction res),
cancelAction = (fun () ->
while !asyncResult = null do Thread.Sleep 20
cancelAction(!asyncResult)))
while asyncResult.Value = null do Thread.Sleep 20
cancelAction(asyncResult.Value)))
open AsyncHelper

type ConcurrentQueueMessage<'a> =
Expand Down Expand Up @@ -232,12 +232,12 @@ module internal InternalStreams =
while not cts.IsCancellationRequested do
let! data = innerStream.Read()
let finished = ref false
while not !finished do
while not finished.Value do
let! (asyncResult:MyIAsyncReadResult<'a>) = queue.DequeAsync()
if not asyncResult.IsCanceled then
try
asyncResult.End(data)
finished := true
finished.Value <- true
with ReadCanceledException -> () // find next
return ()
}, cancellationToken = workerCts.Token)
Expand Down Expand Up @@ -466,7 +466,7 @@ module internal InternalStreams =
//let raw = infiniteStream()
let readFinished = ref false
let read () =
if !readFinished then
if readFinished.Value then
async.Return None
else
async {
Expand All @@ -477,16 +477,16 @@ module internal InternalStreams =
match s with
| Some d -> Some d
| None ->
readFinished := true
readFinished.Value <- true
None
| None ->
failwith "stream should not be limited as we are using an infiniteStream!" }
let isFinished = ref false
let finish () = async {
do! raw.Write None
isFinished := true }
isFinished.Value <- true }
let write item =
if !isFinished then
if isFinished.Value then
failwith "stream is in finished state so it should not be written to!"
raw.Write (Some item)
finish,
Expand Down
4 changes: 3 additions & 1 deletion src/app/Fake.Core.Process/RawProc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ module EnvMap =
else IMap.empty

let ofSeq l : EnvMap =
empty.AddRange(l |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))
empty
.AddRange(Environment.environVars () |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))
.AddRange(l |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))

let create() =
ofSeq (Environment.environVars ())
Expand Down

0 comments on commit 517659c

Please sign in to comment.