Skip to content

Commit

Permalink
Merge pull request #168 from nojaf/update-fcs-43-8-100
Browse files Browse the repository at this point in the history
Update SDK, FCS and tools.
  • Loading branch information
nojaf authored Nov 22, 2023
2 parents ae263a5 + 9b06739 commit 2bf6d6a
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "6.2.1",
"version": "6.3.0-alpha-003",
"commands": [
"fantomas"
]
},
"fsdocs-tool": {
"version": "20.0.0-alpha-009",
"version": "20.0.0-alpha-014",
"commands": [
"fsdocs"
]
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.21.0] - 2023-11-22

### Changed
* [Update FCS to 43.8.100](https://github.com/ionide/FSharp.Analyzers.SDK/pull/168) (thanks @nojaf!)

## [0.20.2] - 2023-11-14

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<DisableImplicitLibraryPacksFolder>true</DisableImplicitLibraryPacksFolder>
<ChangelogFile>$(MSBuildThisFileDirectory)CHANGELOG.md</ChangelogFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<WarnOn>$(WarnOn);1182</WarnOn> <!-- Unused variables,https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/compiler-options#opt-in-warnings -->
<WarnOn>$(WarnOn);3390</WarnOn><!-- Malformed XML doc comments -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OtherFlags>$(OtherFlags) --test:GraphBasedChecking --test:ParallelOptimization --test:ParallelIlxGen</OtherFlags>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CliWrap" Version="3.6.4" />
<PackageVersion Include="FSharp.Core" Version="[7.0.400]" />
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.7.400]" />
<PackageVersion Include="FSharp.Core" Version="[8.0.100]" />
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.8.100]" />
<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.1.8" PrivateAssets="all" />
<PackageVersion Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageVersion Include="Argu" Version="6.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.400",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
43 changes: 26 additions & 17 deletions src/FSharp.Analyzers.SDK/ASTCollecting.fs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ module ASTCollecting =

and walkAttribute (attr: SynAttribute) = walkExpr attr.ArgExpr

and walkTyparDecl (SynTyparDecl(attributes = AllAttrs attrs; Item2 = typar)) =
and walkTyparDecl (SynTyparDecl(attributes = AllAttrs attrs; typar = typar; intersectionConstraints = ts)) =
List.iter walkAttribute attrs
walkTypar typar
List.iter walkType ts

and walkTyparDecls (typars: SynTyparDecls) =
typars.TyparDecls |> List.iter walkTyparDecl
Expand Down Expand Up @@ -180,7 +181,6 @@ module ASTCollecting =
| SynPat.Record(_, r) -> ()
| SynPat.Null r -> ()
| SynPat.OptionalVal(_, r) -> ()
| SynPat.DeprecatedCharRange(_, _, r) -> ()
| SynPat.InstanceMember(_, _, _, accessibility, r) -> ()
| SynPat.FromParseError(_, r) -> ()
| SynPat.As(lpat, rpat, r) ->
Expand Down Expand Up @@ -251,6 +251,9 @@ module ASTCollecting =
walkType lhs
walkType rhs
| SynType.FromParseError r -> ()
| SynType.Intersection(typar, types, _, _) ->
Option.iter walkTypar typar
List.iter walkType types

and walkClause (SynMatchClause(pat, e1, e2, r, _, _) as s) =
walker.WalkClause s
Expand Down Expand Up @@ -365,52 +368,58 @@ module ASTCollecting =
walkType t
walkMemberSig sign
walkExpr e
| SynExpr.Const(SynConst.Measure(_, _, m), r) -> walkMeasure m
| SynExpr.Const(SynConst.Measure(synMeasure = m), _) -> walkMeasure m
| SynExpr.Const(_, r) -> ()
| SynExpr.AnonRecd(isStruct, copyInfo, recordFields, r, trivia) -> ()
| SynExpr.Sequential(seqPoint, isTrueSeq, expr1, expr2, r) -> ()
| SynExpr.Ident _ -> ()
| SynExpr.LongIdent(isOptional, longDotId, altNameRefCell, r) -> ()
| SynExpr.Set(_, _, r) -> ()
| SynExpr.Set(range = r) -> ()
| SynExpr.Null r -> ()
| SynExpr.ImplicitZero r -> ()
| SynExpr.MatchBang(range = r) -> ()
| SynExpr.LibraryOnlyILAssembly(_, _, _, _, r) -> ()
| SynExpr.LibraryOnlyStaticOptimization(_, _, _, r) -> ()
| SynExpr.LibraryOnlyILAssembly(range = r) -> ()
| SynExpr.LibraryOnlyStaticOptimization(range = r) -> ()
| SynExpr.LibraryOnlyUnionCaseFieldGet(expr, longId, _, r) -> ()
| SynExpr.LibraryOnlyUnionCaseFieldSet(_, longId, _, _, r) -> ()
| SynExpr.LibraryOnlyUnionCaseFieldSet(longId = longId; range = r) -> ()
| SynExpr.ArbitraryAfterError(debugStr, r) -> ()
| SynExpr.FromParseError(expr, r) -> ()
| SynExpr.DiscardAfterMissingQualificationAfterDot(_, _, r) -> ()
| SynExpr.DiscardAfterMissingQualificationAfterDot(range = r) -> ()
| SynExpr.Fixed(expr, r) -> ()
| SynExpr.InterpolatedString(parts, kind, r) ->

for part in parts do
walkInterpolatedStringPart part
| SynExpr.IndexFromEnd(itemExpr, r) -> walkExpr itemExpr
| SynExpr.IndexRange(e1, _, e2, _, _, r) ->
| SynExpr.IndexRange(expr1 = e1; expr2 = e2; range = r) ->
Option.iter walkExpr e1
Option.iter walkExpr e2
| SynExpr.DebugPoint(innerExpr = expr) -> walkExpr expr
| SynExpr.Dynamic(funcExpr = e1; argExpr = e2; range = range) ->
walkExpr e1
walkExpr e2
| SynExpr.Typar(t, r) -> walkTypar t
| SynExpr.DotLambda(expr = e) -> walkExpr e
| SynExpr.WhileBang(whileExpr = whileExpr; doExpr = doExpr) ->
walkExpr whileExpr
walkExpr doExpr

and walkMeasure s =
walker.WalkMeasure s

match s with
| SynMeasure.Product(m1, m2, r)
| SynMeasure.Divide(m1, m2, r) ->
| SynMeasure.Product(measure1 = m1; measure2 = m2) ->
walkMeasure m1
walkMeasure m2
| SynMeasure.Named(longIdent, r) -> ()
| SynMeasure.Seq(ms, r) -> List.iter walkMeasure ms
| SynMeasure.Power(m, _, r) -> walkMeasure m
| SynMeasure.Var(ty, r) -> walkTypar ty
| SynMeasure.Paren(m, r) -> walkMeasure m
| SynMeasure.One
| SynMeasure.Divide(measure1 = m1; measure2 = m2) ->
Option.iter walkMeasure m1
walkMeasure m2
| SynMeasure.Named _ -> ()
| SynMeasure.Seq(ms, _) -> List.iter walkMeasure ms
| SynMeasure.Power(measure = m) -> walkMeasure m
| SynMeasure.Var(ty, _) -> walkTypar ty
| SynMeasure.Paren(m, _) -> walkMeasure m
| SynMeasure.One _
| SynMeasure.Anon _ -> ()

and walkSimplePat s =
Expand Down
4 changes: 1 addition & 3 deletions src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ type EditorAnalyzerAttribute

member _.Name = name

type Context =
interface
end
type Context = interface end

type CliContext =
{
Expand Down
4 changes: 1 addition & 3 deletions src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ type EditorAnalyzerAttribute =
member Name: string

/// Marker interface which both the CliContext and EditorContext implement
type Context =
interface
end
type Context = interface end

/// All the relevant compiler information for a given file.
/// Contains the source text, untyped and typed tree information.
Expand Down

0 comments on commit 2bf6d6a

Please sign in to comment.