Repository navigation
Workspace peek - #191
Workspace peek#191
Conversation
|
code has |
|
published the sln parsers as package, from https://github.com/enricosada/sln |
|
@rneatherway @kjnilsson @Krzysztof-Cieslak this PR is done for me, asking for review/feedback. |
| nuget FSharp.Compiler.Service 11.0.9 framework: >= net45 | ||
| nuget FSharp.Compiler.Service.ProjectCracker 11.0.9 | ||
| nuget Dotnet.ProjInfo 0.7.4 | ||
| nuget Sln 0.2.0 |
There was a problem hiding this comment.
Any reason to pin version?
There was a problem hiding this comment.
is not 1.0 yet, so i can publish new version and i dont guarantee the api compatibility between minor.
just to avoid issues for others, while updating deps.
| WorkspacePeekFound.Solution { WorkspacePeekFoundSolution.Path = p; Items = items; Configurations = [] } | ||
|
|
||
| let data = { WorkspacePeekResponse.Found = found |> List.map mapInt } | ||
| serialize { Kind = "project"; Data = data } |
There was a problem hiding this comment.
We try to use different Kind for each response, project is used by project command
There was a problem hiding this comment.
copy paste, sigh, good catch
| } | ||
|
|
||
| [<RequireQualifiedAccess>] | ||
| type Interesting = |
There was a problem hiding this comment.
Interesting doesn't sound like best name
There was a problem hiding this comment.
suggestions? cannot think anything else atm.
this is the list of stuff who can or cannot be useful in the dir (for example fsx are not returned by command later)
| |> Some | ||
| with _ -> | ||
| None | ||
| match slnFile with |
| } | ||
| and [<RequireQualifiedAccess>] WorkspacePeekFoundSolutionItemKindFolder = { | ||
| Items: WorkspacePeekFoundSolutionItem list | ||
| Files: string list |
There was a problem hiding this comment.
What ends up here rather than in Items?
There was a problem hiding this comment.
The files inside a solution folder, in the list the full paths.
Is in another property instead of WorkspacePeekFoundSolutionItem, because a file can be only inside a solution folder, not at root level (solution) like a project
|
Works for me, no objections. |
6caeb27 to
6820277
Compare
Proj2.fsproj guid was changed because was equal to Proj1.fsproj
6820277 to
60479d2
Compare
ref #181
this PR add a
workspacePeekcommand who return info about interesting stuff in a directory.this is a really fast command, just do a peek (up to a deep level, passed as option in the command) so user/editor can later choose what use.
This allow client to open big repo, with mixed solution too, and choose only a subset to initialize.
Otherwise client atm just try to load all (long and useless) or the one the client think is related to a
.fsfile opened (can be wrong, for example if there are more or is imported with relative paths)client can also pass the directories to exclude from search, useful for the like of
.git,paket-filesetcIdeal flow:
workspacePeek, who return the list of solutions and fsproj in directoryprojectcommand is sent, to initialize only theseNext work (not this PR) is maybe a
workspaceLoad, who accept to choice, to initialize a whole solution or list of fsprojsBig items:
solution: *.sln are parsed (list of solution folder, projects, etc) and full structure graph is returned. fsproj are not yet parsed to initialize FCS in this step, for that continue to be needed theprojectcommand.directory: current directory with all fsproj pathsI excluded the
.fsxbecause while interesting sort of, can be a lot, and just noise atm.todo: