-
Notifications
You must be signed in to change notification settings - Fork 34
Issue with fsproj-file location #79
Comments
Yes within reason. Perhaps limited to 2 or 3 parent directories.
…On Fri, 2 Jun 2017 at 08:56, Viktor Andersson ***@***.***> wrote:
tl dr;
Could it be a reasonable default to look for fsproj-files in the current
folder and any parent folders recursively?
According to the plugin documentation, opening an .fs-file will load any
fsproj-file in that directory.
And some experimentation will show this to be true :)
With the following project structure:
- Project.fsproj
- Library.fs
- Folder/File1.fs
- Folder/File2.fs
Given that Library.fs opens modules from File1 and File2 and
given that File2 opens a module from File1.
1.
I can open a vim-session for Library.fs an it will resolve any modules
correctly because if will have loaded Project.fsproj.
2.
If I start a new vim-session and start with opening File2 it will not
be able to resolve the module in File1 because Project.fsproj will not be
loaded since it is located in a parent folder.
3.
However if I start a new vim-session and open Library.fs (which will
load Project.fsproj) and then open File2 it will resolve the modules in
File1 since the project file already is loaded.
Could we solve 2. by letting the plugin search for fsproj-files in parent
directories?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#79>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABIDlNpecqAmmvYHSibwzRCoEiWTMlDKks5r_7IbgaJpZM4Nt5lO>
.
|
actually the limit should be configurable with a default that retains the current behaviour (only scanning the same dir as the file). |
Sure, that would work great. Just for information I ran into the issue when I was using the dotnet cli template for fable-elmish-react. That template is using a project structure with the .fsproj-file in the root-directory and all .fs-files in a src-subfolder. So when opening any .fs-file in the src-folder it never would be able to load the .fsproj-file. |
@kjnilsson the search of fsproj is now supported fsac side (ref ionide/FsAutoComplete#191 ) and support also sln files. So should help implement this feature (just run |
tl dr;
Could it be a reasonable default to look for fsproj-files in the current folder and any parent folders recursively?
According to the plugin documentation, opening an .fs-file will load any fsproj-file in that directory.
And some experimentation will show this to be true :)
With the following project structure:
Given that Library.fs opens modules from File1 and File2 and
given that File2 opens a module from File1.
I can open a vim-session for Library.fs an it will resolve any modules correctly because if will have loaded Project.fsproj.
If I start a new vim-session and start with opening File2 it will not be able to resolve the module in File1 because Project.fsproj will not be loaded since it is located in a parent folder.
However if I start a new vim-session and open Library.fs (which will load Project.fsproj) and then open File2 it will resolve the modules in File1 since the project file already is loaded.
Could we solve 2. by letting the plugin search for fsproj-files in parent directories?
The text was updated successfully, but these errors were encountered: