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

Dev16 fixes - cross project referencing #5833

Merged
merged 12 commits into from
Nov 12, 2018

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Oct 27, 2018

This PR does a lot. In order to react to the dev16 changes, we needed to take an entirely different approach to computing options. Essentially, we compute the options whenever one of the analyzer first ask for it.

@TIHan
Copy link
Contributor Author

TIHan commented Oct 30, 2018

@KevinRansom @cartermp @Pilchie This is ready. We really need to get this in preview 1 because right now all cross project referencing for F# does not work at all in dev16 preview 1 without these major changes.

@@ -206,7 +206,7 @@ type internal FSharpLanguageService(package : FSharpPackage, solution: IVsSoluti
let projectDisplayName = projectDisplayNameOf projectFileName
Some (workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName))

let mutable legacyProjectWorkspaceMap = Unchecked.defaultof<LegacyProjectWorkspaceMap>
let _legacyProjectWorkspaceMap = new LegacyProjectWorkspaceMap(solution, projectInfoManager, package.ComponentModel.GetService<IWorkspaceProjectContextFactory>())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because I just need to make an instance of it and hold it. Internally, it subscribes to events that we care about.

@TIHan
Copy link
Contributor Author

TIHan commented Nov 1, 2018

@KevinRansom @dsyme @cartermp I really a review for this soon, because this needs to get in preview 1.

Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

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

Nice job.

[<AutoOpen>]
module private FSharpProjectOptionsHelpers =

let mapCpsProjectToSite(workspace:VisualStudioWorkspaceImpl, project:Project, serviceProvider:System.IServiceProvider, cpsCommandLineOptions: IDictionary<ProjectId, string[] * string[]>) =
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't use the original. But in my second PR: #5845 - ProjectSitesAndFiles.fs get completely removed.

@TIHan TIHan changed the base branch from dev16.0 to dev16.0-preview1 November 8, 2018 21:42
@KevinRansom KevinRansom merged commit e8acfc6 into dotnet:dev16.0-preview1 Nov 12, 2018
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Trying to fix dev16 with latest changes

* Dev16 is partially working

* Fixed several issues, should be working dev16

* Using try..with on computing options

* Deleting unused code

* Minor refactor

* Check command line option cps stamps for recompute as a backup

* Using ProjectId for project options

* Updating binoutputpath for legacy projects to workspace project

* Removing cps stamp as we don't need it

* Updated roslyn package. Using IWorkspaceProjectContext.Id.

* update to Roslyn d16p1 packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants