Replies: 14 comments
-
Hey @jbeeko 👋, Thank you for opening an issue. We will get back to you as https://opencollective.com/ionide
|
Beta Was this translation helpful? Give feedback.
-
@Krzysztof-Cieslak How should I handle the "related bugs referenced? Leave them or close them with a reference here? |
Beta Was this translation helpful? Give feedback.
-
Requiring to open Folder and the fact files need to belong to the opened folder (or subfolders) is by-design behaviour of Ionide/FSAC. I don't think we plan to change it. |
Beta Was this translation helpful? Give feedback.
-
@Krzysztof-Cieslak is this due to a technical constraint, because of the effort to make the change or, because the designers feel that is the way it should be for a UX perspective? It does seem to almost work andI think there is value in being able to open an .fsx file anywhere and get editor support. For example downloading sample scripts in and being able to just open them rather than needing to put them in a directory and opening the directory. I was poking around trying to find where FSAC is started. If this can be made to work would such a PR be declined? All that said, if this decision will not be changed then perhaps there should be a warning of some sort when an isolated .fsx file is opened. The current "it kinda works some of the time" behaviour is quite confusing. |
Beta Was this translation helpful? Give feedback.
-
No, it’s not almost working :-) There are plenty of things in FsAutoComplete that currently assume that it runs in a folder that contains files. Things like path normalization, handling absolute paths vs relative paths, locations for creating caches (like .ionide folder), file watchers. All those things are parts of different layers of FSAC and ProjectSystem Supporting running FSAC out-of-work-folder would require lot of work and lot of special code paths for just this scenario. I think it’s too “expensive” and too risky to do. |
Beta Was this translation helpful? Give feedback.
-
Ok I looked at references to I think you are also under estimating the value of this scenario. One premise of Ionide is that it is the simple low-friction quick way to get going with FSharp and not supporting script files outside a workspace goes against that. I think this will be an even bigger issue once the new #r directive hits. With .NET 5.0 there will be an expectation that one can just open a .fsx file put in some nuget refs and go. Think of being able to download a Waypoint literate So should this issue just be closed or have I convinced you it is a valid feature request and should be tagged as such? |
Beta Was this translation helpful? Give feedback.
-
It seems some of this work may overlap with the work needed to address #1204 |
Beta Was this translation helpful? Give feedback.
-
It's not only this - In FASC, basically every |
Beta Was this translation helpful? Give feedback.
-
Both Windows and MacOS have well defined ways to create temp directories. What about if there is no workspace.rootPath creating a temp directory and using that? I would guess such a change would be much less invasive. |
Beta Was this translation helpful? Give feedback.
-
Another easy UI (temporary?) workaround could be to trigger a pop-up asking if the user wants to open the file as part of its enclosing folder? |
Beta Was this translation helpful? Give feedback.
-
@OkayX6 sounds like nice UX improvement. |
Beta Was this translation helpful? Give feedback.
-
It seems that the symbols cache is the only thing getting written into the .ionide folder. So when opening a "bare" .fsx file a thought I had was to automatically make the enclosing folder the workspace, without a prompt, and then open SQLite in memory. The db's when working with .fsx files alone are pretty small. |
Beta Was this translation helpful? Give feedback.
-
I found this coming from #1275. My encounter and workaround is a follows (
At this point the previously opened project did not have any of the ionide feature available to it.
This enabled the iodine features on open. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
ScriptingBug.zip
Describe the bug
When a .fsx script file is opened directly using Open... the Language Server does not start reliably.
This report clarifies some prior reports. It seems that issues
#1371
Part of #1375
Part of #1378
And the behaviour commented on in #1357
Are due to the fact that the Language Server does not start reliably if a .fsx file edited by opening it directly rather than be opening a directory and then selecting the .fsx file in the File Explorer.
I think this is distinct from the race condition first identified in #1357.
How to Replicate
Primary Bug
Probably Related Bug
If you quit VSCode with no file or Directory open and then use Open... to open the Directory ScriptingBug Language Services lite up as files are selected in the VSCode File Explorer, i.e. things work as they should.
However if you quit VSCode with a script file opened by selecting it in the File Explorer and then quite and restart VSCode the file will be auto-reopened BUT no laguage services will be active for that auto-opened file. This does not change even if the editor is closed and reopened using the File Explorer. However other .fsx files opened will have language servcies.
What should happen
Further observation/discussion/ideas
Even when the Laguage Server starts on a file no .ionide directory is created. This is the correct behavior otherwise these will clutter up the users file system.
Could these notifications
Message: Cached typecheck results not yet available
be used to try start the LS if not running?Is there a reliable "starting to edit even VSCode generates that can be used to start the LS?
Why is syntax highlighting working but not the LS could this be used to start the LS
Issue #1378 reports errors thrown when creating a new un-saved file with F# mode selected. The behaviour differs based on if a file was opend or a directory was opened. In both cases the errors shown in that bug are reported to the output. But
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions