Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge nightly into main for the release! #1180

Merged
merged 67 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
dc0aa38
reenable dotnet-tools feed for nightly FCS
baronfel Feb 20, 2023
f451fd0
minimal changes to update to latest FCS
baronfel Feb 20, 2023
7fce94d
add nightly to testing matrix
baronfel Feb 20, 2023
ed2c864
add a workflow that updates FCS on a regular cadence
baronfel Feb 20, 2023
cf2b0e7
fix formatting
baronfel Feb 20, 2023
9aa7178
fix formatting of cron expression
baronfel Feb 20, 2023
3fda100
give the new workflow a name
baronfel Feb 20, 2023
0deab12
update Proj-Info to enable nightly FCS updates without breaking the w…
baronfel Feb 20, 2023
19683a1
enable update now that proj-info is unblocked
baronfel Feb 20, 2023
c7e3921
updated FCS to the latest nightly
invalid-email-address Feb 20, 2023
aa054b6
updated FCS to the latest nightly
invalid-email-address Feb 23, 2023
162b9b9
updated FCS to the latest nightly
invalid-email-address Feb 24, 2023
5962938
updated FCS to the latest nightly
invalid-email-address Feb 25, 2023
2cf2494
update from AST changes
baronfel Feb 25, 2023
6658216
merge main
baronfel Feb 25, 2023
ade0f4f
Merge branch 'main' into nightly
baronfel Feb 25, 2023
cf32450
Merge branch 'main' into nightly
baronfel Feb 26, 2023
3380bb0
Merge branch 'main' into nightly
baronfel Feb 26, 2023
4c5e159
Merge branch 'main' into nightly
baronfel Mar 3, 2023
78f2864
bump FCS nightly again
baronfel Mar 3, 2023
b108431
Merge branch 'main' into nightly
baronfel Mar 12, 2023
16c6dbc
Add fsproj/renameFilex (#1075)
MangelMaxime Mar 13, 2023
213a302
Merge branch 'main' into nightly
baronfel Mar 13, 2023
a8ed709
fix bad merge from main
baronfel Mar 13, 2023
355cea5
fix bad merge from main
baronfel Mar 16, 2023
60dfd46
Merge branch 'main' into nightly
baronfel Mar 20, 2023
19cd678
bump nightly FCS
baronfel Mar 20, 2023
662e753
bump FCS
baronfel Mar 24, 2023
a672a75
bump again
baronfel Apr 4, 2023
4443c10
Merge branch 'main' into nightly
baronfel Apr 13, 2023
e68f204
bump FCS
baronfel Apr 13, 2023
640c091
fix formatting
baronfel Apr 13, 2023
251dd8f
add nightly auto-push workflow
baronfel Apr 14, 2023
2967aac
fix nuget version format
baronfel Apr 14, 2023
3f0c00f
don't forget to restore
baronfel Apr 14, 2023
7036a39
try the 4.4 version
baronfel Apr 14, 2023
6534613
fix missing TaskResult dependency
baronfel Apr 14, 2023
d6af6d1
try using GITHUB_TOKEN to auth
baronfel Apr 14, 2023
c041223
can't pass build properties through un"
baronfel Apr 14, 2023
6e93ecc
fix copying
baronfel Apr 14, 2023
a68f624
add missing IcedTasks direct dependency
baronfel Apr 14, 2023
adea5cf
Merge branch 'main' into nightly
baronfel Apr 23, 2023
409060b
bump FCS
baronfel Apr 23, 2023
3c437d5
reenable prefix/replace _ tests now that we have an FCS that supports…
baronfel Apr 23, 2023
02a4f4b
formatting
baronfel Apr 23, 2023
43affde
Merge branch 'main' into nightly
baronfel May 21, 2023
5619a68
Use dotnet 7 feed (#1121)
nojaf Jun 20, 2023
3d40f74
Update FCS to 43.7.400-preview.23319.6
nojaf Jun 20, 2023
0e7670c
Process API changes up to 43.7.400-preview.23319.6
nojaf Jun 20, 2023
7fa6387
Add langversion from args.
nojaf Jun 20, 2023
ef409bb
Don't suggest a missing parameter for AutoProperty.
nojaf Jun 21, 2023
bb7ed6f
no XML parameter section for AutoProperties
dawedawe Jun 22, 2023
b96493f
symbolUseWorkspace2!
nojaf Jun 22, 2023
61cca4a
Maybe this can be reomoved completey, as it doesn't seem to be used. …
dawedawe Jun 24, 2023
caca858
- Update to Ionide.ProjInfo nightly
dawedawe Jun 27, 2023
7fc82db
consolidate to use new TryGetSymbolUses
dawedawe Jun 28, 2023
6cfa454
Use of the now public Range propery of PreXmlDoc (#1128)
dawedawe Jul 4, 2023
9553a7f
merge main to get features/fixes since then
baronfel Aug 21, 2023
5be7315
merge from main to get up to date
baronfel Aug 21, 2023
1f1011a
Use dotnet 8 feed. (#1153)
nojaf Sep 6, 2023
b9d0927
Update FCS to 43.8.100-preview.23455.5. (#1162)
nojaf Oct 6, 2023
1a04de1
Update to FCS 43.8.100-preview.23478.1 (#1172)
nojaf Oct 6, 2023
63fa1ad
merge from main, bump FCS to latest NuGet.org preview
baronfel Oct 21, 2023
c9f4687
Merge branch 'main' into nightly
baronfel Oct 22, 2023
cb61a45
try to diagnose which test is failing
baronfel Oct 22, 2023
d570459
Merge branch 'main' into nightly
baronfel Oct 29, 2023
9cf7b31
Fcs 43.8.100 stable (#1206)
nojaf Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
BuildNet8: ${{ matrix.build_net8 }}

- name: Run and report tests
run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --no-build --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true
run: dotnet test -c Release -f ${{ matrix.test_tfm }} --no-restore --no-build --no-build --logger GitHubActions /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="System.Reactive|FSharp.Compiler.Service|Ionide.ProjInfo|FSharp.Analyzers|Analyzer|Humanizer|FSharp.Core|FSharp.DependencyManager" -- Expecto.fail-on-focused-tests=true --blame-hang --blame-hang-timeout 1m
working-directory: test/FsAutoComplete.Tests.Lsp
env:
BuildNet7: ${{ matrix.build_net7 }}
Expand Down
4 changes: 2 additions & 2 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ framework: netstandard2.0, netstandard2.1, net6.0, net7.0, net8.0

source https://api.nuget.org/v3/index.json
# this is the FCS nightly feed, re-enable at your own risk!
#source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
# source: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
#source: ./libs
storage: none
strategy: min
Expand All @@ -13,7 +13,7 @@ lowest_matching: true

nuget BenchmarkDotNet 0.13.5
nuget Fantomas.Client >= 0.9
nuget FSharp.Compiler.Service >= 43.7.400
nuget FSharp.Compiler.Service >= 43.8.100
nuget Ionide.ProjInfo >= 0.62.0
nuget Ionide.ProjInfo.FCS >= 0.62.0
nuget Ionide.ProjInfo.ProjectSystem >= 0.62.0
Expand Down
6 changes: 3 additions & 3 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ NUGET
FSharp.Compiler.Service (>= 41.0.1) - restriction: || (== net6.0) (== net7.0) (== net8.0) (&& (== netstandard2.0) (>= net5.0)) (&& (== netstandard2.1) (>= net5.0))
FSharp.Core (>= 6.0.1) - restriction: || (== net6.0) (== net7.0) (== net8.0) (&& (== netstandard2.0) (>= net5.0)) (&& (== netstandard2.1) (>= net5.0))
McMaster.NETCore.Plugins (>= 1.4) - restriction: || (== net6.0) (== net7.0) (== net8.0) (&& (== netstandard2.0) (>= net5.0)) (&& (== netstandard2.1) (>= net5.0))
FSharp.Compiler.Service (43.7.400)
FSharp.Core (7.0.400)
FSharp.Compiler.Service (43.8.100)
FSharp.Core (8.0.100)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 7.0)
System.Diagnostics.DiagnosticSource (>= 7.0.2)
Expand All @@ -74,7 +74,7 @@ NUGET
FSharp.Control.Reactive (5.0.5) - restriction: || (== net6.0) (== net7.0) (== net8.0) (&& (== netstandard2.0) (>= net6.0)) (&& (== netstandard2.1) (>= net6.0))
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0 < 6.0)
FSharp.Core (7.0.400)
FSharp.Core (8.0.100)
FSharp.Data.Adaptive (1.2.13)
FSharp.Core (>= 4.7)
System.Reflection.Emit.Lightweight (>= 4.6)
Expand Down
3 changes: 2 additions & 1 deletion src/FsAutoComplete.Core/AbstractClassStubGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ type AbstractClassData =

let private (|ExplicitCtor|_|) =
function
| SynMemberDefn.Member(SynBinding(valData = SynValData(Some({ MemberKind = SynMemberKind.Constructor }), _, _)), _) ->
| SynMemberDefn.Member(
memberDefn = SynBinding(valData = SynValData(memberFlags = Some({ MemberKind = SynMemberKind.Constructor })))) ->
Some()
| _ -> None

Expand Down
12 changes: 7 additions & 5 deletions src/FsAutoComplete.Core/CodeGeneration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -573,14 +573,14 @@ module CodeGenerationUtils =
/// We also get the range of the leading keyword to establish indent position
let (|MemberNamePlusRangeAndKeywordRange|_|) =
function
| SynBinding(valData = SynValData(Some mf, _, _); headPat = LongIdentPattern(name, range); trivia = trivia) when
| SynBinding(valData = SynValData(memberFlags = Some mf); headPat = LongIdentPattern(name, range); trivia = trivia) when
mf.MemberKind = SynMemberKind.PropertyGet
->
if name.StartsWith("get_") then
Some(name, range, trivia.LeadingKeyword.Range)
else
Some("get_" + name, range, trivia.LeadingKeyword.Range)
| SynBinding(valData = SynValData(Some mf, _, _); headPat = LongIdentPattern(name, range); trivia = trivia) when
| SynBinding(valData = SynValData(memberFlags = Some mf); headPat = LongIdentPattern(name, range); trivia = trivia) when
mf.MemberKind = SynMemberKind.PropertySet
->
if name.StartsWith("set_") then
Expand Down Expand Up @@ -793,9 +793,11 @@ module CodeGenerationUtils =

let rec (|RationalConst|) =
function
| SynRationalConst.Integer i -> string i
| SynRationalConst.Rational(numerator, denominator, _) -> sprintf "(%i/%i)" numerator denominator
| SynRationalConst.Negate(RationalConst s) -> sprintf "- %s" s
| SynRationalConst.Integer(value = i) -> string i
| SynRationalConst.Rational(numerator = numerator; denominator = denominator) ->
sprintf "(%i/%i)" numerator denominator
| SynRationalConst.Negate(rationalConst = RationalConst s) -> sprintf "- %s" s
| SynRationalConst.Paren(rationalConst = inner) -> (|RationalConst|) inner

let rec (|TypeIdent|_|) =
function
Expand Down
6 changes: 4 additions & 2 deletions src/FsAutoComplete.Core/FCSPatches.fs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ module SyntaxTreeOps =
| SynExpr.YieldOrReturnFrom(_, e, _)
| SynExpr.DoBang(e, _)
| SynExpr.Fixed(e, _)
| SynExpr.Paren(e, _, _, _) -> walkExpr e
| SynExpr.Paren(e, _, _, _)
| SynExpr.DotLambda(expr = e) -> walkExpr e

| SynExpr.NamedIndexedPropertySet(_, e1, e2, _)
| SynExpr.DotSet(e1, _, e2, _)
Expand Down Expand Up @@ -495,7 +496,8 @@ module SyntaxTreeOps =
yield! bindings ]

| SynExpr.ForEach(enumExpr = e1; bodyExpr = e2)
| SynExpr.While(whileExpr = e1; doExpr = e2) -> walkExpr e1 || walkExpr e2
| SynExpr.While(whileExpr = e1; doExpr = e2)
| SynExpr.WhileBang(whileExpr = e1; doExpr = e2) -> walkExpr e1 || walkExpr e2

| SynExpr.For(identBody = e1; toBody = e2; doBody = e3) -> walkExpr e1 || walkExpr e2 || walkExpr e3

Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/Lexer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module Lexer =
| _ -> defines, langVersion)

let sourceTokenizer =
FSharpSourceTokenizer(Seq.toList defines, Some "/tmp.fsx", langVersion)
FSharpSourceTokenizer(Seq.toList defines, Some "/tmp.fsx", langVersion, None)

let lineTokenizer = sourceTokenizer.CreateLineTokenizer lineStr

Expand Down
9 changes: 9 additions & 0 deletions src/FsAutoComplete.Core/ParseAndCheckResults.fs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,14 @@ type ParseAndCheckResults
if symbol.IsPropertyGetterMethod then
Ok(typ, [], [])
else
let symbol =
// Symbol is a property with both get and set.
// Take the setter symbol in this case.
if symbol.HasGetterMethod && symbol.HasSetterMethod then
symbol.SetterMethod
else
symbol

let parms =
symbol.CurriedParameterGroups
|> Seq.map (
Expand Down Expand Up @@ -645,6 +653,7 @@ type ParseAndCheckResults
| CompletionItemKind.Argument -> 4
| CompletionItemKind.Other -> 5
| CompletionItemKind.Method(isExtension = true) -> 6
| CompletionItemKind.SuggestedName -> 7

let decls =
match filter with
Expand Down
2 changes: 0 additions & 2 deletions src/FsAutoComplete.Core/UnionPatternMatchCaseGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ let private clauseIsCandidateForCodeGen (cursorPos: Position) (SynMatchClause(pa
| SynPat.Null _
| SynPat.IsInst _
| SynPat.QuoteExpr _
| SynPat.DeprecatedCharRange _
| SynPat.InstanceMember _
| SynPat.FromParseError _
| SynPat.As _
Expand Down Expand Up @@ -306,7 +305,6 @@ let getWrittenCases (patMatchExpr: PatternMatchExpr) =
| SynPat.InstanceMember(_, _, _, _, _)
| SynPat.IsInst(_, _)
| SynPat.QuoteExpr(_, _)
| SynPat.DeprecatedCharRange(_, _, _)
| SynPat.ListCons _
| SynPat.FromParseError(_, _) -> false

Expand Down
84 changes: 41 additions & 43 deletions src/FsAutoComplete.Core/UntypedAstUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module Syntax =

let rec walkImplFileInput (ParsedImplFileInput(contents = moduleOrNamespaceList)) =
List.iter walkSynModuleOrNamespace moduleOrNamespaceList
()

and walkSynModuleOrNamespace (SynModuleOrNamespace(decls = decls; attribs = AllAttrs attrs; range = r) as s) =
walker.WalkSynModuleOrNamespace s
Expand All @@ -96,9 +97,10 @@ module Syntax =

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 @@ -155,7 +157,6 @@ module Syntax =
| 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 @@ -223,6 +224,9 @@ module Syntax =
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 All @@ -245,20 +249,23 @@ module Syntax =
walker.WalkExpr s

match s with
| SynExpr.Typed(e, _, r) -> walkExpr e
| SynExpr.Paren(e, _, _, r)
| SynExpr.Quote(_, _, e, _, r)
| SynExpr.InferredUpcast(e, r)
| SynExpr.InferredDowncast(e, r)
| SynExpr.AddressOf(_, e, _, r)
| SynExpr.DoBang(e, r)
| SynExpr.YieldOrReturn(_, e, r)
| SynExpr.ArrayOrListComputed(_, e, r)
| SynExpr.ComputationExpr(_, e, r)
| SynExpr.Do(e, r)
| SynExpr.Assert(e, r)
| SynExpr.Lazy(e, r)
| SynExpr.YieldOrReturnFrom(_, e, r) -> walkExpr e
| SynExpr.Typed(expr = e)
| SynExpr.Paren(expr = e)
| SynExpr.InferredUpcast(expr = e)
| SynExpr.InferredDowncast(expr = e)
| SynExpr.AddressOf(expr = e)
| SynExpr.DoBang(expr = e)
| SynExpr.YieldOrReturn(expr = e)
| SynExpr.ArrayOrListComputed(expr = e)
| SynExpr.ComputationExpr(expr = e)
| SynExpr.Do(expr = e)
| SynExpr.Assert(expr = e)
| SynExpr.Lazy(expr = e)
| SynExpr.YieldOrReturnFrom(expr = e)
| SynExpr.DotLambda(expr = e) -> walkExpr e
| SynExpr.Quote(operator, _, quotedExpr, _, _) ->
walkExpr operator
walkExpr quotedExpr
| SynExpr.SequentialOrImplicitYield(_, e1, e2, ifNotE, r) ->
walkExpr e1
walkExpr e2
Expand Down Expand Up @@ -337,7 +344,7 @@ module Syntax =
walkType t
walkMemberSig sign
walkExpr e
| SynExpr.Const(SynConst.Measure(_, _, m), r) -> walkMeasure m
| SynExpr.Const(SynConst.Measure(synMeasure = m), r) -> walkMeasure m
| SynExpr.Const(_, r) -> ()
| SynExpr.AnonRecd(isStruct, copyInfo, recordFields, r, trivia) -> ()
| SynExpr.Sequential(seqPoint, isTrueSeq, expr1, expr2, r) -> ()
Expand Down Expand Up @@ -368,22 +375,27 @@ module Syntax =
walkExpr e1
walkExpr e2
| SynExpr.Typar(t, r) -> walkTypar t
| 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.Divide(m1, _, m2, r) ->
Option.iter walkMeasure m1
walkMeasure m2
| SynMeasure.Named(longIdent, r) -> ()
| SynMeasure.Seq(ms, r) -> List.iter walkMeasure ms
| SynMeasure.Power(m, _, r) -> walkMeasure m
| SynMeasure.Power(m, _, _, r) -> walkMeasure m
| SynMeasure.Var(ty, r) -> walkTypar ty
| SynMeasure.Paren(m, r) -> walkMeasure m
| SynMeasure.One
| SynMeasure.Anon _ -> ()
| SynMeasure.One(_)
| SynMeasure.Anon(_) -> ()

and walkSimplePat s =
walker.WalkSimplePat s
Expand Down Expand Up @@ -423,14 +435,7 @@ module Syntax =
| SynMemberSig.ValField(f, r) -> walkField f
| SynMemberSig.NestedType(SynTypeDefnSig(typeInfo = info; typeRepr = repr; members = memberSigs), r) ->

let isTypeExtensionOrAlias =
match repr with
| SynTypeDefnSigRepr.Simple(SynTypeDefnSimpleRepr.TypeAbbrev _, _)
| SynTypeDefnSigRepr.ObjectModel(SynTypeDefnKind.Abbrev, _, _)
| SynTypeDefnSigRepr.ObjectModel(SynTypeDefnKind.Augmentation _, _, _) -> true
| _ -> false

walkComponentInfo isTypeExtensionOrAlias info
walkComponentInfo info
walkTypeDefnSigRepr repr
List.iter walkMemberSig memberSigs

Expand Down Expand Up @@ -492,7 +497,6 @@ module Syntax =
| SynTypeDefnSimpleRepr.Exception(_) -> ()

and walkComponentInfo
isTypeExtensionOrAlias
(SynComponentInfo(
attributes = AllAttrs attrs; typeParams = typars; constraints = constraints; longId = longIdent; range = r) as s)
=
Expand Down Expand Up @@ -520,14 +524,7 @@ module Syntax =
and walkTypeDefn (SynTypeDefn(info, repr, members, implicitCtor, r, _) as s) =
walker.WalkTypeDefn s

let isTypeExtensionOrAlias =
match repr with
| SynTypeDefnRepr.ObjectModel(SynTypeDefnKind.Augmentation _, _, _)
| SynTypeDefnRepr.ObjectModel(SynTypeDefnKind.Abbrev, _, _)
| SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.TypeAbbrev _, _) -> true
| _ -> false

walkComponentInfo isTypeExtensionOrAlias info
walkComponentInfo info
walkTypeDefnRepr repr
Option.iter walkMember implicitCtor
List.iter walkMember members
Expand All @@ -538,7 +535,7 @@ module Syntax =
match decl with
| SynModuleDecl.NamespaceFragment fragment -> walkSynModuleOrNamespace fragment
| SynModuleDecl.NestedModule(info, _, modules, _, r, _) ->
walkComponentInfo false info
walkComponentInfo info
List.iter walkSynModuleDecl modules
| SynModuleDecl.Let(_, bindings, r) -> List.iter walkBinding bindings
| SynModuleDecl.Expr(expr, r) -> walkExpr expr
Expand All @@ -549,6 +546,7 @@ module Syntax =
| SynModuleDecl.Open(longDotId, r) -> ()
| SynModuleDecl.HashDirective(_, r) -> ()


match input with
| ParsedInput.ImplFile input -> walkImplFileInput input
| _ -> ()
Expand Down Expand Up @@ -627,9 +625,9 @@ module FoldingRange =
| SynMeasure.Seq(range = r)
| SynMeasure.Power(range = r)
| SynMeasure.Var(range = r)
| SynMeasure.Paren(range = r) -> addIfInside r
| SynMeasure.One
| SynMeasure.Anon _ -> ()
| SynMeasure.Paren(range = r)
| SynMeasure.One(range = r)
| SynMeasure.Anon(range = r) -> addIfInside r

override _.WalkSimplePat p = addIfInside p.Range
override _.WalkField(SynField(range = r)) = addIfInside r
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let title = "Add missing '=' to type definition"

/// a codefix that adds in missing '=' characters in type declarations
let fix (getFileLines: GetFileLines) =
Run.ifDiagnosticByCode (Set.ofList [ "3360" ]) (fun diagnostic codeActionParams ->
Run.ifDiagnosticByCode (Set.ofList [ "10" ]) (fun diagnostic codeActionParams ->
asyncResult {
let fileName = codeActionParams.TextDocument.GetFilePath() |> Utils.normalizePath

Expand Down
4 changes: 2 additions & 2 deletions src/FsAutoComplete/CodeFixes/AdjustConstant.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ let inline private unreachable () = invalidOp "unreachable"
let private tryFindConstant ast pos =
let rec findConst range constant =
match constant with
| SynConst.Measure(constant, constantRange, _) when rangeContainsPos constantRange pos ->
findConst constantRange constant
| SynConst.Measure(constant = c; constantRange = constantRange) when rangeContainsPos constantRange pos ->
findConst constantRange c
| _ -> (range, constant)

SyntaxTraversal.Traverse(
Expand Down
4 changes: 2 additions & 2 deletions test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let private addMissingEqualsToTypeDefinitionTests state =
"""
type Person $0{ Name : string; Age : int; City : string }
"""
(Diagnostics.expectCode "3360")
(Diagnostics.expectCode "10")
selectCodeFix
"""
type Person = { Name : string; Age : int; City : string }
Expand All @@ -29,7 +29,7 @@ let private addMissingEqualsToTypeDefinitionTests state =
"""
type Name $0Name of string
"""
(Diagnostics.expectCode "3360")
(Diagnostics.expectCode "10")
selectCodeFix
"""
type Name = Name of string
Expand Down
2 changes: 1 addition & 1 deletion test/FsAutoComplete.Tests.Lsp/ScriptTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ let dependencyManagerTests state =
| Ok _ -> failwith "Expected to fail typechecking a script with a dependency manager that's missing"
| Core.Result.Error e ->
match e with
| [| { Code = Some "3216" }; _ |] -> () // this is the error code that signals a missing dependency manager, so this is a 'success'
| [| { Code = Some "998" }; _ |] -> () // this is the error code that signals a missing dependency manager, so this is a 'success'
| e -> failwithf "Unexpected error during typechecking: %A" e
}) ] ]

Expand Down
Loading