-
Notifications
You must be signed in to change notification settings - Fork 155
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
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. |
@@ -5,6 +5,7 @@ nuget Argu 3.7 | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to pin version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to use different Kind for each response, project
is used by project command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy paste, sigh, good catch
} | ||
|
||
[<RequireQualifiedAccess>] | ||
type Interesting = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting
doesn't sound like best name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content or Contents?
src/FsAutoComplete.Core/Workspace.fs
Outdated
|> Some | ||
with _ -> | ||
None | ||
match slnFile with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option.map
?
} | ||
and [<RequireQualifiedAccess>] WorkspacePeekFoundSolutionItemKindFolder = { | ||
Items: WorkspacePeekFoundSolutionItem list | ||
Files: string list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What ends up here rather than in Items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
workspacePeek
command 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
.fs
file 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-files
etcIdeal flow:
workspacePeek
, who return the list of solutions and fsproj in directoryproject
command 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 theproject
command.directory
: current directory with all fsproj pathsI excluded the
.fsx
because while interesting sort of, can be a lot, and just noise atm.todo: