Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clean projectinfomanager (#6850)
* Expose IsScript from CompileOps so IVT is not needed

* Undo rename of internal VersionStamp in PatternMatcher
  • Loading branch information
cartermp authored and KevinRansom committed May 31, 2019
commit 53f8ea1bc1944351c2596b707bacfaf900953482
2 changes: 2 additions & 0 deletions src/fsharp/service/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3325,3 +3325,5 @@ module PrettyNaming =
let QuoteIdentifierIfNeeded id = Lexhelp.Keywords.QuoteIdentifierIfNeeded id
let KeywordNames = Lexhelp.Keywords.keywordNames

module FSharpFileUtilities =
let isScriptFile (fileName: string) = CompileOps.IsScript fileName
3 changes: 3 additions & 0 deletions src/fsharp/service/service.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -761,3 +761,6 @@ module public PrettyNaming =
/// All the keywords in the F# language
val KeywordNames : string list

/// A set of helpers for dealing with F# files.
module FSharpFileUtilities =
val isScriptFile : string -> bool
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ open System.ComponentModel.Composition
open System.IO
open System.Linq
open Microsoft.CodeAnalysis
open FSharp.Compiler.CompileOps
open FSharp.Compiler.SourceCodeServices
open Microsoft.VisualStudio
open Microsoft.VisualStudio.FSharp.Editor
Expand Down Expand Up @@ -359,7 +358,7 @@ type internal FSharpProjectOptionsManager
let parsingOptions =
match reactor.TryGetCachedOptionsByProjectId(document.Project.Id) with
| Some (_, parsingOptions, _) -> parsingOptions
| _ -> { FSharpParsingOptions.Default with IsInteractive = IsScript document.Name }
| _ -> { FSharpParsingOptions.Default with IsInteractive = FSharpFileUtilities.isScriptFile document.Name }
CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions

member this.TryGetOptionsByProject(project) =
Expand Down