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 main to release/dev17.8 #15942

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docs/fcs/editor.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ let decls =

// Print the names of available items
for item in decls.Items do
printfn " - %s" item.Name
printfn " - %s" item.NameInList

(**

Expand Down
3 changes: 3 additions & 0 deletions docs/fcs/filesystem.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ let B = File1.A + File1.A"""
member _.IsStableFileHeuristic(path) =
defaultFileSystem.IsStableFileHeuristic(path)

member this.ChangeExtensionShim(path, extension) =
defaultFileSystem.ChangeExtensionShim(path, extension)

let myFileSystem = MyFileSystem()
FileSystem <- MyFileSystem()

Expand Down
2 changes: 1 addition & 1 deletion docs/fcs/tokenizer.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ file name of the source code. The defined symbols are required because the
tokenizer handles `#if` directives. The file name is required only to specify
locations of the source code (and it does not have to exist):
*)
let sourceTok = FSharpSourceTokenizer([], Some "C:\\test.fsx")
let sourceTok = FSharpSourceTokenizer([], Some "C:\\test.fsx", Some "PREVIEW", None)
(**
Using the `sourceTok` object, we can now (repeatedly) tokenize lines of
F# source code.
Expand Down
18 changes: 7 additions & 11 deletions docs/fcs/untypedtree.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ used more often):
/// Walk over a pattern - this is for example used in
/// let <pat> = <expr> or in the 'match' expression
let rec visitPattern = function
| SynPat.Wild(_) ->
| SynPat.Wild _ ->
printfn " .. underscore pattern"
| SynPat.Named(name, _, _, _) ->
| SynPat.Named(ident = SynIdent(ident = name)) ->
printfn " .. named as '%s'" name.idText
| SynPat.LongIdent(LongIdentWithDots(ident, _), _, _, _, _, _, _) ->
| SynPat.LongIdent(longDotId = SynLongIdent(id = ident)) ->
let names = String.concat "." [ for i in ident -> i.idText ]
printfn " .. identifier: %s" names
| pat -> printfn " .. other pattern: %A" pat
Expand Down Expand Up @@ -145,9 +145,7 @@ let rec visitExpression e =
// for 'let .. = .. and .. = .. in ...'
printfn "LetOrUse with the following bindings:"
for binding in bindings do
let (SynBinding(
access, kind, isInline, isMutable, attrs, xmlDoc, data,
headPat, retInfo, init, equalsRange, debugPoint, trivia)) = binding
let (SynBinding(headPat = headPat; expr = init)) = binding
visitPattern headPat
visitExpression init
// Visit the body expression
Expand Down Expand Up @@ -177,9 +175,7 @@ let visitDeclarations decls =
// Let binding as a declaration is similar to let binding
// as an expression (in visitExpression), but has no body
for binding in bindings do
let (SynBinding(
access, kind, isInline, isMutable, attrs, xmlDoc,
valData, pat, retInfo, body, equalsRange, debugPoint, trivia)) = binding
let (SynBinding(headPat = pat; expr = body)) = binding
visitPattern pat
visitExpression body
| _ -> printfn " - not supported declaration: %A" declaration
Expand All @@ -194,7 +190,7 @@ with multiple `namespace Foo` declarations:
/// does not explicitly define it..
let visitModulesAndNamespaces modulesOrNss =
for moduleOrNs in modulesOrNss do
let (SynModuleOrNamespace(lid, isRec, isMod, decls, xml, attrs, accessibility, range)) = moduleOrNs
let (SynModuleOrNamespace(longId = lid; decls = decls)) = moduleOrNs
printfn "Namespace or module: %A" lid
visitDeclarations decls
(**
Expand Down Expand Up @@ -238,7 +234,7 @@ in the previous step:
match tree with
| ParsedInput.ImplFile(implFile) ->
// Extract declarations and walk over them
let (ParsedImplFileInput(fn, script, name, _, _, modules, _, _)) = implFile
let (ParsedImplFileInput(contents = modules)) = implFile
visitModulesAndNamespaces modules
| _ -> failwith "F# Interface file (*.fsi) not supported."
(**
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23451.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="8.0.0-alpha.1.23455.3">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>0030d238c7929b0e9b06576837b60ad90037b1d2</Sha>
<Sha>75ec14a961f43446d952c64b5b3330df750db54f</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.7.0-preview-23217-02">
Expand Down