Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
29 changes: 15 additions & 14 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,18 @@ NUGET
System.Threading.Tasks.Dataflow (>= 6.0)
System.Buffers (4.5.1)
System.CodeDom (6.0) - copy_local: false
System.Collections.Immutable (6.0)
System.Memory (>= 4.5.4) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Collections.Immutable (7.0)
System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.CommandLine (2.0.0-beta4.22272.1)
System.Memory (>= 4.5.4) - restriction: || (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.ComponentModel.Annotations (5.0) - restriction: || (&& (== net6.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.1)) (== netstandard2.0)
System.Configuration.ConfigurationManager (6.0)
System.Security.Cryptography.ProtectedData (>= 6.0)
System.Security.Permissions (>= 6.0)
System.Diagnostics.DiagnosticSource (6.0)
System.Memory (>= 4.5.4) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net6.0) (< net5.0)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net5.0)) (== netstandard2.0) (== netstandard2.1)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Diagnostics.DiagnosticSource (7.0.2)
System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (== net6.0) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Drawing.Common (6.0) - copy_local: false, restriction: || (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
Microsoft.Win32.SystemEvents (>= 6.0) - restriction: || (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
System.Formats.Asn1 (6.0) - copy_local: false
Expand All @@ -346,8 +346,9 @@ NUGET
System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard1.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) (&& (== netstandard2.1) (< netstandard1.1)) (&& (== netstandard2.1) (< netstandard2.0)) (&& (== netstandard2.1) (>= uap10.1))
System.Reflection.Emit.Lightweight (4.7)
System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (< portable-net45+wp8)) (&& (== net6.0) (>= uap10.1)) (&& (== net7.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net7.0) (< netstandard2.0)) (&& (== net7.0) (< portable-net45+wp8)) (&& (== net7.0) (>= uap10.1)) (== netstandard2.0) (&& (== netstandard2.1) (< netstandard2.0)) (&& (== netstandard2.1) (< portable-net45+wp8)) (&& (== netstandard2.1) (>= uap10.1))
System.Reflection.Metadata (6.0.1)
System.Collections.Immutable (>= 6.0)
System.Reflection.Metadata (7.0)
System.Collections.Immutable (>= 7.0)
System.Memory (>= 4.5.5) - restriction: || (&& (== net6.0) (>= net462)) (&& (== net7.0) (>= net462)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Resources.Extensions (6.0) - copy_local: false
System.Memory (>= 4.5.4) - restriction: || (&& (== net6.0) (>= net461)) (&& (== net7.0) (>= net461)) (&& (== net7.0) (< net6.0)) (== netstandard2.0) (== netstandard2.1)
System.Runtime.CompilerServices.Unsafe (6.0)
Expand Down Expand Up @@ -387,16 +388,16 @@ NUGET
FSharp.Core (>= 4.6.2) - restriction: || (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
System.Collections.Immutable (>= 6.0) - restriction: || (== net6.0) (== net7.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) (&& (== netstandard2.1) (>= netcoreapp3.1))
remote: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
FSharp.Compiler.Service (43.7.400-preview.23221.1)
FSharp.Core (7.0.400-beta.23221.1)
FSharp.Compiler.Service (43.7.400-preview.23319.6)
FSharp.Core (7.0.400-beta.23319.6)
System.Buffers (>= 4.5.1)
System.Collections.Immutable (>= 6.0)
System.Diagnostics.DiagnosticSource (>= 6.0)
System.Collections.Immutable (>= 7.0)
System.Diagnostics.DiagnosticSource (>= 7.0.2)
System.Memory (>= 4.5.5)
System.Reflection.Emit (>= 4.7)
System.Reflection.Metadata (>= 6.0.1)
System.Reflection.Metadata (>= 7.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
FSharp.Core (7.0.400-beta.23221.1)
FSharp.Core (7.0.400-beta.23319.6)

GROUP Build
STORAGE: NONE
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/InlayHints.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ and private defaultTraversePat visitor origPath pat =
| SynPat.As(p1, p2, _)
| SynPat.Or(p1, p2, _, _) -> [ p1; p2 ] |> List.tryPick (traversePat visitor path)
| SynPat.Ands(ps, _)
| SynPat.Tuple(_, ps, _)
| SynPat.Tuple(elementPats = ps)
| SynPat.ArrayOrList(_, ps, _) -> ps |> List.tryPick (traversePat visitor path)
| SynPat.Attrib(p, _, _) -> traversePat visitor path p
| SynPat.LongIdent(argPats = args) ->
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 @@ -48,7 +48,7 @@ module Lexer =
|> Seq.choose (fun s -> if s.StartsWith "--define:" then Some s.[9..] else None)
|> Seq.toList

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should check if we have langVersion available via the project options - we should try to provide it here if possible. This can be a follow-up issue if you don't want to tackle it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I got it.

let lineTokenizer = sourceTokenizer.CreateLineTokenizer lineStr

let rec loop lexState acc =
Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete.Core/UnionPatternMatchCaseGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ let getWrittenCases (patMatchExpr: PatternMatchExpr) =
| SynPat.ListCons _
| SynPat.FromParseError(_, _) -> false

| SynPat.Tuple(_, innerPatList, _) -> List.forall checkPattern innerPatList
| SynPat.Tuple(elementPats = innerPatList) -> List.forall checkPattern innerPatList

| SynPat.Record(recordInnerPatList, _) ->
recordInnerPatList
Expand Down
11 changes: 3 additions & 8 deletions src/FsAutoComplete.Core/UntypedAstUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ let (|AllAttrs|) (attrs: SynAttributes) =
let (|AllSimplePats|) (pats: SynSimplePats) =
let rec loop acc pat =
match pat with
| SynSimplePats.SimplePats(pats, _) -> acc @ pats
| SynSimplePats.Typed(pats, _, _) -> loop acc pats
| SynSimplePats.SimplePats(pats = pats) -> acc @ pats

loop [] pats

Expand Down Expand Up @@ -122,7 +121,7 @@ let internal getRangesAtPosition input (r: Position) : Range list =

and walkPat =
function
| SynPat.Tuple(_, pats, r)
| SynPat.Tuple(elementPats = pats; range = r)
| SynPat.ArrayOrList(_, pats, r)
| SynPat.Ands(pats, r) ->
addIfInside r
Expand Down Expand Up @@ -253,13 +252,9 @@ let internal getRangesAtPosition input (r: Position) : Range list =

and walkSimplePats =
function
| SynSimplePats.SimplePats(pats, r) ->
| SynSimplePats.SimplePats(pats = pats; range = r) ->
addIfInside r
List.iter walkSimplePat pats
| SynSimplePats.Typed(pats, ty, r) ->
addIfInside r
walkSimplePats pats
walkType ty

and walkInterpolatedStringPart =
function
Expand Down
1 change: 0 additions & 1 deletion src/FsAutoComplete/CodeFixes/AddExplicitTypeAnnotation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ let private isPositionContainedInUntypedImplicitCtorParameter input pos =
| _ -> None

return! tryGetUntypedIdent pat
| _ -> return! None
}
|> Option.orElseWith (fun _ -> defaultTraverse decl)
| _ -> defaultTraverse decl }
Expand Down