Skip to content

Commit

Permalink
removed tons of warnings cased by FS3365 and FS3370 (mostly div[][] v…
Browse files Browse the repository at this point in the history
…s div [] []), some exhaustive pattern matches, some deprecation fixes
  • Loading branch information
haraldsteinlechner committed Jan 25, 2024
1 parent 3afd9ef commit a7e7ea1
Show file tree
Hide file tree
Showing 23 changed files with 147 additions and 146 deletions.
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ group Test
framework: net6.0, net6.0-windows
source https://api.nuget.org/v3/index.json

nuget FSharp.Core ~> 5.0.2 lowest_matching: true
nuget FSharp.Core ~> 6.0.2 lowest_matching: true
nuget NUnit ~> 3.13.3
nuget FsUnit ~> 5.0.0
nuget FsCheck ~> 2.16.4
Expand Down
124 changes: 61 additions & 63 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -849,105 +849,103 @@ GROUP Test
RESTRICTION: || (== net6.0) (== net6.0-windows7.0)
NUGET
remote: https://api.nuget.org/v3/index.json
BenchmarkDotNet (0.13.4)
BenchmarkDotNet.Annotations (>= 0.13.4)
CommandLineParser (>= 2.4.3)
BenchmarkDotNet (0.13.12)
BenchmarkDotNet.Annotations (>= 0.13.12)
CommandLineParser (>= 2.9.1)
Gee.External.Capstone (>= 2.3)
Iced (>= 1.17)
Microsoft.CodeAnalysis.CSharp (>= 3.0)
Microsoft.CodeAnalysis.CSharp (>= 4.1)
Microsoft.Diagnostics.Runtime (>= 2.2.332302)
Microsoft.Diagnostics.Tracing.TraceEvent (>= 3.0.2)
Microsoft.DotNet.PlatformAbstractions (>= 3.1.6)
Perfolizer (>= 0.2.1)
System.Management (>= 6.0)
BenchmarkDotNet.Annotations (0.13.4)
Perfolizer (0.2.1)
System.Management (>= 5.0)
BenchmarkDotNet.Annotations (0.13.12)
CommandLineParser (2.9.1)
Expecto (9.0.4)
FSharp.Core (>= 4.6)
Mono.Cecil (>= 0.11.3)
Expecto.FsCheck (9.0.4)
Expecto (>= 9.0.4)
FsCheck (>= 2.14.3)
FsCheck (2.16.5)
FsCheck (2.16.6)
FSharp.Core (>= 4.2.3)
FsCheck.NUnit (2.16.5)
FsCheck (2.16.5)
FsCheck.NUnit (2.16.6)
FsCheck (2.16.6)
NUnit (>= 3.13.1 < 4.0)
FSharp.Core (5.0.2)
FSharp.Core (6.0.2)
FsUnit (5.0.5)
FSharp.Core (>= 5.0.2)
NUnit (>= 3.13.3 < 3.14)
Gee.External.Capstone (2.3)
Iced (1.18)
Microsoft.Bcl.AsyncInterfaces (7.0)
Iced (1.21)
Microsoft.CodeAnalysis.Analyzers (3.3.4)
Microsoft.CodeAnalysis.Common (4.4)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.3)
Microsoft.CodeAnalysis.Common (4.8)
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
System.Collections.Immutable (>= 7.0)
System.Reflection.Metadata (>= 7.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Microsoft.CodeAnalysis.CSharp (4.8)
Microsoft.CodeAnalysis.Common (4.8)
Microsoft.CodeCoverage (17.8)
Microsoft.Diagnostics.NETCore.Client (0.2.505301)
Microsoft.Extensions.Logging (>= 6.0)
Microsoft.Diagnostics.Runtime (3.1.456101)
Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101)
System.Collections.Immutable (>= 6.0)
System.Memory (>= 4.5.5)
System.Reflection.Metadata (>= 5.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Text.Encoding.CodePages (>= 6.0)
System.Threading.Tasks.Extensions (>= 4.5.4)
Microsoft.CodeAnalysis.CSharp (4.4)
Microsoft.CodeAnalysis.Common (4.4)
Microsoft.CodeCoverage (17.4.1)
Microsoft.Diagnostics.NETCore.Client (0.2.410101)
Microsoft.Bcl.AsyncInterfaces (>= 1.1)
Microsoft.Extensions.Logging (>= 2.1.1)
Microsoft.Diagnostics.Runtime (2.3.405304)
Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802)
System.Collections.Immutable (>= 5.0)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
Microsoft.Diagnostics.Tracing.TraceEvent (3.0.7)
Microsoft.Diagnostics.Tracing.TraceEvent (3.1.7)
Microsoft.Win32.Registry (>= 4.4)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
Microsoft.DotNet.PlatformAbstractions (3.1.6)
Microsoft.Extensions.DependencyInjection (7.0)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
Microsoft.Extensions.DependencyInjection.Abstractions (7.0)
Microsoft.Extensions.Logging (7.0)
Microsoft.Extensions.DependencyInjection (>= 7.0)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
Microsoft.Extensions.Logging.Abstractions (>= 7.0)
Microsoft.Extensions.Options (>= 7.0)
Microsoft.Extensions.Logging.Abstractions (7.0)
Microsoft.Extensions.Options (7.0.1)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
Microsoft.Extensions.Primitives (>= 7.0)
Microsoft.Extensions.Primitives (7.0)
Microsoft.Extensions.DependencyInjection (8.0)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
Microsoft.Extensions.DependencyInjection.Abstractions (8.0)
Microsoft.Extensions.Logging (8.0)
Microsoft.Extensions.DependencyInjection (>= 8.0)
Microsoft.Extensions.Logging.Abstractions (>= 8.0)
Microsoft.Extensions.Options (>= 8.0)
Microsoft.Extensions.Logging.Abstractions (8.0)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
Microsoft.Extensions.Options (8.0.1)
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
Microsoft.Extensions.Primitives (>= 8.0)
Microsoft.Extensions.Primitives (8.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
Microsoft.NET.Test.Sdk (17.2)
Microsoft.CodeCoverage (>= 17.2)
Microsoft.TestPlatform.TestHost (>= 17.2)
Microsoft.NETCore.Platforms (7.0)
Microsoft.TestPlatform.ObjectModel (17.4.1)
NuGet.Frameworks (>= 5.11)
Microsoft.NET.Test.Sdk (17.2.1)
Microsoft.CodeCoverage (>= 17.2.1)
Microsoft.TestPlatform.TestHost (>= 17.2.1)
Microsoft.NETCore.Platforms (7.0.4)
Microsoft.TestPlatform.ObjectModel (17.8)
NuGet.Frameworks (>= 6.5)
System.Reflection.Metadata (>= 1.6)
Microsoft.TestPlatform.TestHost (17.4.1)
Microsoft.TestPlatform.ObjectModel (>= 17.4.1)
Microsoft.TestPlatform.TestHost (17.8)
Microsoft.TestPlatform.ObjectModel (>= 17.8)
Newtonsoft.Json (>= 13.0.1)
Mono.Cecil (0.11.4)
Microsoft.Win32.Registry (5.0)
System.Security.AccessControl (>= 5.0)
System.Security.Principal.Windows (>= 5.0)
Mono.Cecil (0.11.5)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
Newtonsoft.Json (13.0.2)
NuGet.Frameworks (6.4)
Newtonsoft.Json (13.0.3)
NuGet.Frameworks (6.8)
NUnit (3.13.3)
NETStandard.Library (>= 2.0)
NUnit3TestAdapter (4.2.1)
Perfolizer (0.2.1)
System.Memory (>= 4.5.3)
System.CodeDom (7.0)
System.Collections.Immutable (7.0)
System.CodeDom (8.0)
System.Collections.Immutable (8.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Management (7.0)
System.CodeDom (>= 7.0)
System.Management (8.0)
System.CodeDom (>= 8.0)
System.Memory (4.5.5)
System.Reflection.Metadata (7.0)
System.Collections.Immutable (>= 7.0)
System.Reflection.Metadata (8.0)
System.Collections.Immutable (>= 8.0)
System.Runtime.CompilerServices.Unsafe (6.0)
System.Text.Encoding.CodePages (7.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Threading.Tasks.Extensions (4.5.4)
System.Security.AccessControl (6.0)
System.Security.Principal.Windows (5.0)
YoloDev.Expecto.TestSdk (0.12.20)
Expecto (>= 9.0 < 10.0)
FSharp.Core (>= 4.6)
Expand Down
2 changes: 1 addition & 1 deletion src/PRo3D.Core/Drawing/Drawing-Properties.fs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module AnnotationProperties =
// //button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition)][i[clazz "ui icon print"][]]
// ]

yield Html.row "PrintPosition:" [button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition )] [i[clazz "ui icon print"][]]]
yield Html.row "PrintPosition:" [button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition )] [i [clazz "ui icon print"] []]]
yield Html.row "Height:" [Incremental.text (height |> AVal.map (fun d -> sprintf "%.4f m" (d)))]
yield Html.row "HeightDelta:" [Incremental.text (heightD |> AVal.map (fun d -> sprintf "%.4f m" (d)))]
yield Html.row "Avg Altitude:" [Incremental.text (alt |> AVal.map (fun d -> sprintf "%.4f m" (d)))]
Expand Down
2 changes: 1 addition & 1 deletion src/PRo3D.Core/Drawing/Drawing.UI.fs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module UI =
alist {
//yield div[][
let! hc = headerColor
yield div[clazz "header"; style hc][
yield div [clazz "header"; style hc] [
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
]
yield Incremental.i visibleIcon AList.empty
Expand Down
9 changes: 4 additions & 5 deletions src/PRo3D.Core/GeologicSurfaceApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ module GeologicSurfacesUtils =
(color : C4b) =

let diff = points1.Count - points2.Count
match diff%2 with
| 0 ->
if diff % 2 = 0 then
let plus = diff/2
let firstPart =
[
Expand All @@ -90,7 +89,7 @@ module GeologicSurfacesUtils =

firstPart@middlePart@endPart

| 1 ->
else
let plusFirst = Math.Ceiling((float)diff/2.0)
let plusEnd = diff/2
let firstPart =
Expand Down Expand Up @@ -391,7 +390,7 @@ module GeologicSurfacesApp =
yield Incremental.div (AttributeMap.ofList [style infoc])(
alist {
//let! hc = headerColor
yield div[clazz "header"; style bgc][
yield div [clazz "header"; style bgc] [
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
]
//yield i [clazz "large cube middle aligned icon"; style bgc; onClick (fun _ -> SelectSO soid)][]
Expand All @@ -414,7 +413,7 @@ module GeologicSurfacesApp =
let viewProperties (model:AdaptiveGeologicSurfacesModel) =
adaptive {
let! guid = model.selectedGeologicSurface
let empty = div[ style "font-style:italic"][ text "no geologic surface selected" ] |> UI.map PropertiesMessage
let empty = div [style "font-style:italic"] [text "no geologic surface selected" ] |> UI.map PropertiesMessage

match guid with
| Some id ->
Expand Down
4 changes: 2 additions & 2 deletions src/PRo3D.Core/GroupsApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ module GroupsApp =

let viewSelectionButtons =
// Html.table [
div[][
div [] [
div [clazz "ui buttons inverted"] [

button [clazz "ui icon button"; attribute "data-content" "Move Selection"; onMouseClick (fun _ -> MoveLeaves)] [
Expand Down Expand Up @@ -626,7 +626,7 @@ module GroupsApp =
| Some item ->
return view item |> UI.map lifter
| None ->
return div [][]
return div [] []
}

let deleteLeaf (ts:TreeSelection) =
Expand Down
6 changes: 3 additions & 3 deletions src/PRo3D.Core/ScaleBarsApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ module ScaleBarsApp =
yield Incremental.div (AttributeMap.ofList [style infoc])(
alist {
//let! hc = headerColor
yield div[clazz "header"; style bgc][
yield div [clazz "header"; style bgc] [
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
]
//yield i [clazz "large cube middle aligned icon"; style bgc; onClick (fun _ -> SelectSO soid)][]
Expand All @@ -408,7 +408,7 @@ module ScaleBarsApp =
let viewTranslationTools (model:AdaptiveScaleBarsModel) =
adaptive {
let! guid = model.selectedScaleBar
let empty = div[ style "font-style:italic"][ text "no scene object selected" ] |> UI.map TranslationMessage
let empty = div [style "font-style:italic"] [text "no scene object selected"] |> UI.map TranslationMessage

match guid with
| Some id ->
Expand All @@ -422,7 +422,7 @@ module ScaleBarsApp =
let viewProperties (model:AdaptiveScaleBarsModel) =
adaptive {
let! guid = model.selectedScaleBar
let empty = div[ style "font-style:italic"][ text "no scale bar selected" ] |> UI.map PropertiesMessage
let empty = div [style "font-style:italic"] [text "no scale bar selected"] |> UI.map PropertiesMessage

match guid with
| Some id ->
Expand Down
9 changes: 5 additions & 4 deletions src/PRo3D.Core/SceneObjectsApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ module SceneObjectsApp =

yield Incremental.div (AttributeMap.ofList [style infoc])(
alist {
yield div[clazz "header"; style bgc][
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
yield
div [clazz "header"; style bgc] [
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
]

yield i [clazz "home icon"; onClick (fun _ -> FlyToSO soid)] []
Expand All @@ -331,7 +332,7 @@ module SceneObjectsApp =
|> UI.wrapToolTip DataPosition.Bottom "Open Folder"

yield Incremental.i toggleMap AList.empty
|> UI.wrapToolTip DataPosition.Bottom "Toggle Visible"
|> UI.wrapToolTip DataPosition.Bottom "Toggle Visible"

yield i [clazz "Remove icon red"; onClick (fun _ -> RemoveSO soid)] []
|> UI.wrapToolTip DataPosition.Bottom "Remove"
Expand All @@ -343,7 +344,7 @@ module SceneObjectsApp =
let viewTranslationTools (model:AdaptiveSceneObjectsModel) =
adaptive {
let! guid = model.selectedSceneObject
let empty = div[ style "font-style:italic"][ text "no scene object selected" ] |> UI.map TranslationMessage
let empty = div [style "font-style:italic"] [text "no scene object selected"] |> UI.map TranslationMessage

match guid with
| Some id ->
Expand Down
3 changes: 2 additions & 1 deletion src/PRo3D.Core/Surface.fs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ module SurfaceIntersection =
|> HashMap.toList
|> List.choose (fun (id,leaf) ->
match m.sgSurfaces |> HashMap.tryFind id with
| Some s ->
| Some s ->
if filterSurface id leaf s then Some s
else None
| _ -> None
)

let hits =
Expand Down
Loading

0 comments on commit a7e7ea1

Please sign in to comment.