Skip to content

Commit

Permalink
remove false warning about missing cancellation token
Browse files Browse the repository at this point in the history
  • Loading branch information
goswinr committed Nov 10, 2024
1 parent d117490 commit 9db5592
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
8 changes: 4 additions & 4 deletions FeshHosting.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<Product>Fesh</Product>
<PackageId>Fesh</PackageId>

<Version>0.14.1</Version>
<AssemblyVersion>0.14.1</AssemblyVersion>
<FileVersion>0.14.1</FileVersion>
<Version>0.14.2</Version>
<AssemblyVersion>0.14.2</AssemblyVersion>
<FileVersion>0.14.2</FileVersion>

<PackageReleaseNotes>
- add FSI.Shutdown command for hosting
- remove false warning about missing cancellation token
</PackageReleaseNotes>

<Authors>GoswinR</Authors>
Expand Down
10 changes: 5 additions & 5 deletions FeshStandalone.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<Title>Fesh</Title>
<Product>Fesh</Product>

<Version>0.14.1</Version>
<AssemblyVersion>0.14.1</AssemblyVersion>
<FileVersion>0.14.1</FileVersion>
<Version>0.14.2</Version>
<AssemblyVersion>0.14.2</AssemblyVersion>
<FileVersion>0.14.2</FileVersion>

<Company>Goswin Rothenthal</Company> <!-- <Company> shows up on file preview on fesh.exe in windows file explorer-->
<Authors>GoswinR</Authors>
Expand All @@ -56,8 +56,8 @@
<PackageReference Include="FSharp.Compiler.Service" Version="43.8.400" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />

<PackageReference Include="Fittings" Version="0.8.0" />
<PackageReference Include="AvalonLog" Version="0.15.0" />
<PackageReference Include="Fittings" Version="0.8.8" />
<PackageReference Include="AvalonLog" Version="0.16.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />


Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ Or via the menu: `About` -> `Open Settings Folder`.

## Release notes

`0.14.1`
- remove false warning about missing cancellation token

`0.14.0`
- fix bug in unsaved settings
- add FSI.Shutdown command for hosting

`0.13.0`
- fix crash on assembly load conflict
Expand Down
6 changes: 3 additions & 3 deletions Src/Editor/EvaluationTracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ type EvaluationTrackerRenderer (ed:TextEditor, state:InteractionState ) =
| ValueNone ->
``1``

let noIntentLine = findIndent(min lns.LastLineIdx changedLineIdx)
printfn "noIntentLine: %d" noIntentLine
let noIndentLine = findIndent(min lns.LastLineIdx changedLineIdx)
//printfn "noIndentLine: %d" noIndentLine

let rec nextNonWhiteLine i =
if i <= ``1`` then ``1``
Expand All @@ -70,7 +70,7 @@ type EvaluationTrackerRenderer (ed:TextEditor, state:InteractionState ) =
IFeshLog.log.PrintfnDebugMsg "nextNonWhiteLine: Line not found %d" i
``1``

evalFromLine <- nextNonWhiteLine (noIntentLine-1)
evalFromLine <- nextNonWhiteLine (noIndentLine-1)

/// Triggered on each document changed
member _.SetLastChangeAt(changedLineIdx) =
Expand Down
5 changes: 3 additions & 2 deletions Src/Fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ type Fsi private (config:Config) =
// tryAbortInfo.Invoke(controlledExecution, null) |> ignore
match (cts:?> ValueOption<Threading.CancellationTokenSource>) with
| ValueNone -> // the token is none initially when creating a session.
IFeshLog.log.PrintfnFsiErrorMsg "No cancellation token for ControlledExecution found. Cancelling running scripts might not work."
// a reset of FSI would always print this:
//IFeshLog.log.PrintfnFsiErrorMsg "No cancellation token for ControlledExecution found. Cancelling running scripts might not work."
false
| ValueSome ctk ->
ctk.Cancel()
Expand All @@ -163,7 +164,7 @@ type Fsi private (config:Config) =
thread.Abort()
true
#else
ignore thread // to avoid warning
ignore thread // to avoid warning when NETFRAMEWORK is not defined
false
#endif

Expand Down
4 changes: 2 additions & 2 deletions Src/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ module Pen =
else
if br.CanFreeze then
br.Freeze()
else
eprintfn "Could not freeze Pen: %A" br
// else
// eprintfn "Could not freeze Pen: %A" br
br


Expand Down

0 comments on commit 9db5592

Please sign in to comment.