Currently IProjectProvider (and the many implementations) is conflating state (set of data defining a project, such as filename, list of files, compiler flags, etc.) and operations (few methods such as get list of references, get FCS project options).
I think in FSharp.Editing we'd want
a ProjectDescriptor type (set of data)
a single instance of ProjectsManager object which expose the methods but taking ProjectDescriptor as last argument
We'd notice that given a ProjectDescriptor type was defined, we could use it in signatures in LanguageService (we can't do that with IProjectProvider because it itself depends on LanguageService) which in turn would allow to migrate few members currently in VsLanguageService (for no apparent good reason besides they take IProjectProvider), which would help moving more of the logic out of the visual studio project.
Also, considering future client/server plans, we'd have an efficient way to pass ProjectDescriptor handle without a too chatty protocol (we could give id and only use that).
Currently
IProjectProvider
(and the many implementations) is conflating state (set of data defining a project, such as filename, list of files, compiler flags, etc.) and operations (few methods such as get list of references, get FCS project options).I think in FSharp.Editing we'd want
ProjectDescriptor
type (set of data)ProjectsManager
object which expose the methods but takingProjectDescriptor
as last argumentWe'd notice that given a
ProjectDescriptor
type was defined, we could use it in signatures inLanguageService
(we can't do that withIProjectProvider
because it itself depends onLanguageService
) which in turn would allow to migrate few members currently inVsLanguageService
(for no apparent good reason besides they takeIProjectProvider
), which would help moving more of the logic out of the visual studio project.Also, considering future client/server plans, we'd have an efficient way to pass
ProjectDescriptor
handle without a too chatty protocol (we could give id and only use that).