Skip to content

Commit

Permalink
Comment out project updated and removed events because of AVs --- the…
Browse files Browse the repository at this point in the history
… AVs will need fixing
  • Loading branch information
KevinRansom committed Sep 27, 2017
1 parent 560622c commit 216dca9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
35 changes: 19 additions & 16 deletions vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,21 @@ type internal FSharpProjectOptionsManager
match projectTable.TryGetValue(projectId) with
| true, ((_referencedProjects, options), _) ->
let (sourcePaths,_,otherOptions) = this.CommandLineOptions.GetOptionsWithProjectId(projectId)
Some { ProjectFileName = options.ProjectFileName
SourceFiles = if sourcePaths.Length = 0 then options.SourceFiles else sourcePaths
OtherOptions = if otherOptions.Length = 0 then options.OtherOptions else otherOptions
ReferencedProjects = options.ReferencedProjects
IsIncompleteTypeCheckEnvironment = options.IsIncompleteTypeCheckEnvironment
UseScriptResolutionRules = options.UseScriptResolutionRules
LoadTime = options.LoadTime
UnresolvedReferences = options.UnresolvedReferences
OriginalLoadReferences = options.OriginalLoadReferences
ExtraProjectInfo = options.ExtraProjectInfo
Stamp = options.Stamp
}
if sourcePaths.Length = 0 || otherOptions.Length = 0 then
Some options
else
Some { ProjectFileName = options.ProjectFileName
SourceFiles = if sourcePaths.Length = 0 then options.SourceFiles else sourcePaths
OtherOptions = if otherOptions.Length = 0 then options.OtherOptions else otherOptions
ReferencedProjects = options.ReferencedProjects
IsIncompleteTypeCheckEnvironment = options.IsIncompleteTypeCheckEnvironment
UseScriptResolutionRules = options.UseScriptResolutionRules
LoadTime = options.LoadTime
UnresolvedReferences = options.UnresolvedReferences
OriginalLoadReferences = options.OriginalLoadReferences
ExtraProjectInfo = options.ExtraProjectInfo
Stamp = options.Stamp
}
| _ -> None

/// Get the exact options for a document or project
Expand Down Expand Up @@ -374,10 +377,10 @@ type

let workspaceChanged (args:WorkspaceChangeEventArgs) =
match args.Kind with
| WorkspaceChangeKind.ProjectAdded -> this.OnProjectAdded(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectChanged -> this.OnProjectChanged(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectReloaded -> this.OnProjectReloaded(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectRemoved -> this.OnProjectRemoved(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectAdded -> this.OnProjectAdded(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectChanged -> this.OnProjectChanged(args.ProjectId, args.NewSolution)
| WorkspaceChangeKind.ProjectReloaded -> this.OnProjectReloaded(args.ProjectId, args.NewSolution)
// | WorkspaceChangeKind.ProjectRemoved -> this.OnProjectRemoved(args.ProjectId, args.NewSolution)
| _ -> ()

this.Workspace.Options <- this.Workspace.Options.WithChangedOption(Completion.CompletionOptions.BlockForCompletionItems, FSharpConstants.FSharpLanguageName, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type CommandLineOptions (isEmpty:bool) =
| _ -> [||], [||], [||]

member this.SetOptionsWithProjectId(projectId:ProjectId, sourcePaths:string[], referencePaths:string[], options:string[]) =
if isEmpty then commandLineOptions.[projectId] <- (sourcePaths, referencePaths, options)
if not isEmpty then commandLineOptions.[projectId] <- (sourcePaths, referencePaths, options)

static member Empty with get () = emptyCommandLineOptions.Value

Expand Down

0 comments on commit 216dca9

Please sign in to comment.