Skip to content

Commit bcb19b2

Browse files
authored
Merge pull request #377 from pro3d-space/refactor/removeWarnings
Refactor/remove warnings
2 parents fef454b + 87ae0b6 commit bcb19b2

25 files changed

+150
-165
lines changed

paket.dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ group Test
7373
framework: net6.0, net6.0-windows
7474
source https://api.nuget.org/v3/index.json
7575

76-
nuget FSharp.Core ~> 5.0.2 lowest_matching: true
76+
nuget FSharp.Core ~> 6.0.2 lowest_matching: true
7777
nuget NUnit ~> 3.13.3
7878
nuget FsUnit ~> 5.0.0
7979
nuget FsCheck ~> 2.16.4

paket.lock

Lines changed: 61 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -849,105 +849,103 @@ GROUP Test
849849
RESTRICTION: || (== net6.0) (== net6.0-windows7.0)
850850
NUGET
851851
remote: https://api.nuget.org/v3/index.json
852-
BenchmarkDotNet (0.13.4)
853-
BenchmarkDotNet.Annotations (>= 0.13.4)
854-
CommandLineParser (>= 2.4.3)
852+
BenchmarkDotNet (0.13.12)
853+
BenchmarkDotNet.Annotations (>= 0.13.12)
854+
CommandLineParser (>= 2.9.1)
855855
Gee.External.Capstone (>= 2.3)
856856
Iced (>= 1.17)
857-
Microsoft.CodeAnalysis.CSharp (>= 3.0)
857+
Microsoft.CodeAnalysis.CSharp (>= 4.1)
858858
Microsoft.Diagnostics.Runtime (>= 2.2.332302)
859859
Microsoft.Diagnostics.Tracing.TraceEvent (>= 3.0.2)
860860
Microsoft.DotNet.PlatformAbstractions (>= 3.1.6)
861-
Perfolizer (>= 0.2.1)
862-
System.Management (>= 6.0)
863-
BenchmarkDotNet.Annotations (0.13.4)
861+
Perfolizer (0.2.1)
862+
System.Management (>= 5.0)
863+
BenchmarkDotNet.Annotations (0.13.12)
864864
CommandLineParser (2.9.1)
865865
Expecto (9.0.4)
866866
FSharp.Core (>= 4.6)
867867
Mono.Cecil (>= 0.11.3)
868868
Expecto.FsCheck (9.0.4)
869869
Expecto (>= 9.0.4)
870870
FsCheck (>= 2.14.3)
871-
FsCheck (2.16.5)
871+
FsCheck (2.16.6)
872872
FSharp.Core (>= 4.2.3)
873-
FsCheck.NUnit (2.16.5)
874-
FsCheck (2.16.5)
873+
FsCheck.NUnit (2.16.6)
874+
FsCheck (2.16.6)
875875
NUnit (>= 3.13.1 < 4.0)
876-
FSharp.Core (5.0.2)
876+
FSharp.Core (6.0.2)
877877
FsUnit (5.0.5)
878878
FSharp.Core (>= 5.0.2)
879879
NUnit (>= 3.13.3 < 3.14)
880880
Gee.External.Capstone (2.3)
881-
Iced (1.18)
882-
Microsoft.Bcl.AsyncInterfaces (7.0)
881+
Iced (1.21)
883882
Microsoft.CodeAnalysis.Analyzers (3.3.4)
884-
Microsoft.CodeAnalysis.Common (4.4)
885-
Microsoft.CodeAnalysis.Analyzers (>= 3.3.3)
883+
Microsoft.CodeAnalysis.Common (4.8)
884+
Microsoft.CodeAnalysis.Analyzers (>= 3.3.4)
885+
System.Collections.Immutable (>= 7.0)
886+
System.Reflection.Metadata (>= 7.0)
887+
System.Runtime.CompilerServices.Unsafe (>= 6.0)
888+
Microsoft.CodeAnalysis.CSharp (4.8)
889+
Microsoft.CodeAnalysis.Common (4.8)
890+
Microsoft.CodeCoverage (17.8)
891+
Microsoft.Diagnostics.NETCore.Client (0.2.505301)
892+
Microsoft.Extensions.Logging (>= 6.0)
893+
Microsoft.Diagnostics.Runtime (3.1.456101)
894+
Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101)
886895
System.Collections.Immutable (>= 6.0)
887-
System.Memory (>= 4.5.5)
888-
System.Reflection.Metadata (>= 5.0)
889896
System.Runtime.CompilerServices.Unsafe (>= 6.0)
890-
System.Text.Encoding.CodePages (>= 6.0)
891-
System.Threading.Tasks.Extensions (>= 4.5.4)
892-
Microsoft.CodeAnalysis.CSharp (4.4)
893-
Microsoft.CodeAnalysis.Common (4.4)
894-
Microsoft.CodeCoverage (17.4.1)
895-
Microsoft.Diagnostics.NETCore.Client (0.2.410101)
896-
Microsoft.Bcl.AsyncInterfaces (>= 1.1)
897-
Microsoft.Extensions.Logging (>= 2.1.1)
898-
Microsoft.Diagnostics.Runtime (2.3.405304)
899-
Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802)
900-
System.Collections.Immutable (>= 5.0)
901-
System.Runtime.CompilerServices.Unsafe (>= 5.0)
902-
Microsoft.Diagnostics.Tracing.TraceEvent (3.0.7)
897+
Microsoft.Diagnostics.Tracing.TraceEvent (3.1.7)
898+
Microsoft.Win32.Registry (>= 4.4)
903899
System.Runtime.CompilerServices.Unsafe (>= 5.0)
904900
Microsoft.DotNet.PlatformAbstractions (3.1.6)
905-
Microsoft.Extensions.DependencyInjection (7.0)
906-
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
907-
Microsoft.Extensions.DependencyInjection.Abstractions (7.0)
908-
Microsoft.Extensions.Logging (7.0)
909-
Microsoft.Extensions.DependencyInjection (>= 7.0)
910-
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
911-
Microsoft.Extensions.Logging.Abstractions (>= 7.0)
912-
Microsoft.Extensions.Options (>= 7.0)
913-
Microsoft.Extensions.Logging.Abstractions (7.0)
914-
Microsoft.Extensions.Options (7.0.1)
915-
Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0)
916-
Microsoft.Extensions.Primitives (>= 7.0)
917-
Microsoft.Extensions.Primitives (7.0)
901+
Microsoft.Extensions.DependencyInjection (8.0)
902+
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
903+
Microsoft.Extensions.DependencyInjection.Abstractions (8.0)
904+
Microsoft.Extensions.Logging (8.0)
905+
Microsoft.Extensions.DependencyInjection (>= 8.0)
906+
Microsoft.Extensions.Logging.Abstractions (>= 8.0)
907+
Microsoft.Extensions.Options (>= 8.0)
908+
Microsoft.Extensions.Logging.Abstractions (8.0)
909+
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
910+
Microsoft.Extensions.Options (8.0.1)
911+
Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0)
912+
Microsoft.Extensions.Primitives (>= 8.0)
913+
Microsoft.Extensions.Primitives (8.0)
918914
System.Runtime.CompilerServices.Unsafe (>= 6.0)
919-
Microsoft.NET.Test.Sdk (17.2)
920-
Microsoft.CodeCoverage (>= 17.2)
921-
Microsoft.TestPlatform.TestHost (>= 17.2)
922-
Microsoft.NETCore.Platforms (7.0)
923-
Microsoft.TestPlatform.ObjectModel (17.4.1)
924-
NuGet.Frameworks (>= 5.11)
915+
Microsoft.NET.Test.Sdk (17.2.1)
916+
Microsoft.CodeCoverage (>= 17.2.1)
917+
Microsoft.TestPlatform.TestHost (>= 17.2.1)
918+
Microsoft.NETCore.Platforms (7.0.4)
919+
Microsoft.TestPlatform.ObjectModel (17.8)
920+
NuGet.Frameworks (>= 6.5)
925921
System.Reflection.Metadata (>= 1.6)
926-
Microsoft.TestPlatform.TestHost (17.4.1)
927-
Microsoft.TestPlatform.ObjectModel (>= 17.4.1)
922+
Microsoft.TestPlatform.TestHost (17.8)
923+
Microsoft.TestPlatform.ObjectModel (>= 17.8)
928924
Newtonsoft.Json (>= 13.0.1)
929-
Mono.Cecil (0.11.4)
925+
Microsoft.Win32.Registry (5.0)
926+
System.Security.AccessControl (>= 5.0)
927+
System.Security.Principal.Windows (>= 5.0)
928+
Mono.Cecil (0.11.5)
930929
NETStandard.Library (2.0.3)
931930
Microsoft.NETCore.Platforms (>= 1.1)
932-
Newtonsoft.Json (13.0.2)
933-
NuGet.Frameworks (6.4)
931+
Newtonsoft.Json (13.0.3)
932+
NuGet.Frameworks (6.8)
934933
NUnit (3.13.3)
935934
NETStandard.Library (>= 2.0)
936935
NUnit3TestAdapter (4.2.1)
937936
Perfolizer (0.2.1)
938937
System.Memory (>= 4.5.3)
939-
System.CodeDom (7.0)
940-
System.Collections.Immutable (7.0)
938+
System.CodeDom (8.0)
939+
System.Collections.Immutable (8.0)
941940
System.Runtime.CompilerServices.Unsafe (>= 6.0)
942-
System.Management (7.0)
943-
System.CodeDom (>= 7.0)
941+
System.Management (8.0)
942+
System.CodeDom (>= 8.0)
944943
System.Memory (4.5.5)
945-
System.Reflection.Metadata (7.0)
946-
System.Collections.Immutable (>= 7.0)
944+
System.Reflection.Metadata (8.0)
945+
System.Collections.Immutable (>= 8.0)
947946
System.Runtime.CompilerServices.Unsafe (6.0)
948-
System.Text.Encoding.CodePages (7.0)
949-
System.Runtime.CompilerServices.Unsafe (>= 6.0)
950-
System.Threading.Tasks.Extensions (4.5.4)
947+
System.Security.AccessControl (6.0)
948+
System.Security.Principal.Windows (5.0)
951949
YoloDev.Expecto.TestSdk (0.12.20)
952950
Expecto (>= 9.0 < 10.0)
953951
FSharp.Core (>= 4.6)

src/PRo3D.Base/PRo3D.Base.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
1717
</PropertyGroup>
1818
<ItemGroup>
19+
<!-- <Compile Include="InteropHelpers.fs" /> -->
1920
<Compile Include="Multitexturing.fs" />
2021
<Compile Include="ErrorReporting.fs" />
2122
<EmbeddedResource Include="resources\CooTransformationConfig.zip" />

src/PRo3D.Core/Drawing/Drawing-Properties.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ module AnnotationProperties =
130130
// //button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition)][i[clazz "ui icon print"][]]
131131
// ]
132132

133-
yield Html.row "PrintPosition:" [button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition )] [i[clazz "ui icon print"][]]]
133+
yield Html.row "PrintPosition:" [button [clazz "ui button tiny"; onClick (fun _ -> PrintPosition )] [i [clazz "ui icon print"] []]]
134134
yield Html.row "Height:" [Incremental.text (height |> AVal.map (fun d -> sprintf "%.4f m" (d)))]
135135
yield Html.row "HeightDelta:" [Incremental.text (heightD |> AVal.map (fun d -> sprintf "%.4f m" (d)))]
136136
yield Html.row "Avg Altitude:" [Incremental.text (alt |> AVal.map (fun d -> sprintf "%.4f m" (d)))]

src/PRo3D.Core/Drawing/Drawing.UI.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module UI =
140140
alist {
141141
//yield div[][
142142
let! hc = headerColor
143-
yield div[clazz "header"; style hc][
143+
yield div [clazz "header"; style hc] [
144144
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
145145
]
146146
yield Incremental.i visibleIcon AList.empty

src/PRo3D.Core/GeologicSurfaceApp.fs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ module GeologicSurfacesUtils =
6767
(color : C4b) =
6868

6969
let diff = points1.Count - points2.Count
70-
match diff%2 with
71-
| 0 ->
70+
if diff % 2 = 0 then
7271
let plus = diff/2
7372
let firstPart =
7473
[
@@ -90,7 +89,7 @@ module GeologicSurfacesUtils =
9089

9190
firstPart@middlePart@endPart
9291

93-
| 1 ->
92+
else
9493
let plusFirst = Math.Ceiling((float)diff/2.0)
9594
let plusEnd = diff/2
9695
let firstPart =
@@ -391,7 +390,7 @@ module GeologicSurfacesApp =
391390
yield Incremental.div (AttributeMap.ofList [style infoc])(
392391
alist {
393392
//let! hc = headerColor
394-
yield div[clazz "header"; style bgc][
393+
yield div [clazz "header"; style bgc] [
395394
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
396395
]
397396
//yield i [clazz "large cube middle aligned icon"; style bgc; onClick (fun _ -> SelectSO soid)][]
@@ -414,7 +413,7 @@ module GeologicSurfacesApp =
414413
let viewProperties (model:AdaptiveGeologicSurfacesModel) =
415414
adaptive {
416415
let! guid = model.selectedGeologicSurface
417-
let empty = div[ style "font-style:italic"][ text "no geologic surface selected" ] |> UI.map PropertiesMessage
416+
let empty = div [style "font-style:italic"] [text "no geologic surface selected" ] |> UI.map PropertiesMessage
418417

419418
match guid with
420419
| Some id ->

src/PRo3D.Core/GroupsApp.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ module GroupsApp =
590590

591591
let viewSelectionButtons =
592592
// Html.table [
593-
div[][
593+
div [] [
594594
div [clazz "ui buttons inverted"] [
595595

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

632632
let deleteLeaf (ts:TreeSelection) =

src/PRo3D.Core/ScaleBarsApp.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ module ScaleBarsApp =
385385
yield Incremental.div (AttributeMap.ofList [style infoc])(
386386
alist {
387387
//let! hc = headerColor
388-
yield div[clazz "header"; style bgc][
388+
yield div [clazz "header"; style bgc] [
389389
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
390390
]
391391
//yield i [clazz "large cube middle aligned icon"; style bgc; onClick (fun _ -> SelectSO soid)][]
@@ -408,7 +408,7 @@ module ScaleBarsApp =
408408
let viewTranslationTools (model:AdaptiveScaleBarsModel) =
409409
adaptive {
410410
let! guid = model.selectedScaleBar
411-
let empty = div[ style "font-style:italic"][ text "no scene object selected" ] |> UI.map TranslationMessage
411+
let empty = div [style "font-style:italic"] [text "no scene object selected"] |> UI.map TranslationMessage
412412

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

427427
match guid with
428428
| Some id ->

src/PRo3D.Core/SceneObjectsApp.fs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ module SceneObjectsApp =
320320

321321
yield Incremental.div (AttributeMap.ofList [style infoc])(
322322
alist {
323-
yield div[clazz "header"; style bgc][
324-
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
323+
yield
324+
div [clazz "header"; style bgc] [
325+
Incremental.span headerAttributes ([Incremental.text headerText] |> AList.ofList)
325326
]
326327

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

333334
yield Incremental.i toggleMap AList.empty
334-
|> UI.wrapToolTip DataPosition.Bottom "Toggle Visible"
335+
|> UI.wrapToolTip DataPosition.Bottom "Toggle Visible"
335336

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

348349
match guid with
349350
| Some id ->

src/PRo3D.Core/Surface.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ module SurfaceIntersection =
185185
|> HashMap.toList
186186
|> List.choose (fun (id,leaf) ->
187187
match m.sgSurfaces |> HashMap.tryFind id with
188-
| Some s ->
188+
| Some s ->
189189
if filterSurface id leaf s then Some s
190190
else None
191+
| _ -> None
191192
)
192193

193194
let hits =

0 commit comments

Comments
 (0)