Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved!
For Getting Started instructions, see:
For issue reporting, use Github Issues and follow the procedures documented here:
Personal support request (or getting contribution help) should be discussed on F# Software Foundation Slack or the F# Discord.
First things first! In order to build & develop Ionide locally, you'll need to install the following.
-
Fork the Ionide repo https://github.com/ionide/ionide-vscode-fsharp on github.
-
Clone your fork:
git clone git@github.com:YOUR_GITHUB_USER/ionide-vscode-fsharp.git
or if you don't use ssh:
git clone https://github.com/YOUR_GITHUB_USER/ionide-vscode-fsharp.git
-
Open the repo in your terminal:
cd ionide-vscode-fsharp
-
Then build the project by running the build script: (on Mac/Linux)
./build.sh
(or on Windows)
.\build.cmd
-
Voilà! You're ready to run Ionide.
Skip to the Launching Ionide section if the build succeeded.
Otherwise, check out the Troubleshooting Build Failures guide.
This should always be done at least once after any clone/pull.
./build.sh -t Build
(or on Windows)
.\build.cmd -t Build
This will re-install any necesssary packages and files.
-
If the
FsAutoComplete
dependency fails to build, you can re-run it manually:# browse to the FsAutoComplete source code folder cd paket-files/github.com/fsharp/FsAutoComplete # build FsAutoComplete (Mac/Linux) ./build.sh LocalRelease # build FsAutoComplete (Windows) .\build.cmd LocalRelease
-
If
dotnet restore
gives the errorThe tools version "14.0" is unrecognized
, then you need to install [msbuildtools2015][msbuildtools2015] -
If
dotnet restore
gives the errorerror MSB4126: The specified solution configuration "Debug|x64" is invalid
, there's a good chance you have thePlatform
environment variable set to "x64". Unset the variable and try the restore command again. -
If
./build.sh
gives errors, you may need to run./build.sh -t Build
one time.
When you're ready to test out some code changes, you can use vscode's Run View to build and launch Ionide in a new Extension Development Host instance, which is a separate "dev mode" instance of VS code used for developing extensions.
First, open the Ionide project folder in vscode.
cd ionide-vscode-fsharp # or whereever you cloned the ionide repo.
code .
Then, you can open Ionide in a new Extension Development Host
using one of the following methods:
This builds the extension and launches it immediately in a new vscode extension host.
- Open the "Run and Debug" menu (
cmd
+shift
+d
orctrl
+shift
+d
). - Choose the
Build and Launch Extension
launch configuration - Run it by pressing
F5
.
There are two steps involved in running Ionide in Watch Mode.
TL;DR: watch this video clip:
ionide_watch.mp4
- Start the
Watch
task.- Open the command palette (
cmd
+shift
+p
orctrl
+shift
+p
) - Enter
tasks: run tasks
. - Enter
watch
. - Wait a few seconds. It might take 15-30 seconds for the initial build to complete
- Open the command palette (
- Run the
Launch Only
launch configuration.- Open the Run and Debug menu (
cmd
+shift
+d
orctrl
+shift
+d
) - Choose the
Launch Only
configuration - Run it by pressing
F5
.
- Open the Run and Debug menu (
Note: Step 1 starts a new "Watch" task that rebuilds Ionide in the background while you're making source code changes. You should wait for this to finish before opening the Extension Host.
If you're curious what's going on, you can view the log output for this task by running Tasks: Show Running Tasks
from the command palette.
Most Ionide bugs are actually from there. This repo only stores the glue code between FSAC and Visual Studio Code - not the actual implementation of behaviours you would experience when using Ionide in Visual Studio Code which are implemented in FSAC.
-
Fork the FSAC repo https://github.com/fsharp/FsAutoComplete on github.
-
Clone your fork:
git clone git@github.com:YOUR_GITHUB_USER/FsAutoComplete.git
or if you don't use ssh:
git clone https://github.com/YOUR_GITHUB_USER/FsAutoComplete.git
-
Follow the FSAC build instructions and copy the dll output from the output log, it should be a path inside the FSAC repo ending with
src/FsAutoComplete/bin/Release/net6.0/fsautocomplete.dll
. (Alternatively, delete thenet6.0/fsautocomplete.dll
part and it will also work.) Note thatRelease
may be substituted withDebug
if you build with that configuration instead. Also, note thatnet6.0
may be replaced with another .NET version likenet7.0
as FsAutoComplete targets a newer .NET version. -
In the instance of VSCode that you have Ionide open, open settings (
CMD ,
orCtrl ,
by default), and find the sectionFSharp > Fsac: Net Core Dll Path
and paste the output you copied from step 3. -
Now find the section
FSharp > Fsac: Attach Debugger
and check the check box. -
Close settings
-
Goto the debug section and hit
Build and Launch extension
, after a while another instance of VSCode will start, you can use this instance to test Ionide/FsAutoComplete. -
To attach the debugger go back to the instance of VSCode where you open FSAC and goto the debug section, hit
.NET Core Attach
in the list shown you should see all the dotnet processes running, choose one that hasfsautocomplete.dll --mode lsp --attachdebugger
shown. -
Now you will be able to use breakpoints in the FsAutocomplete solution to debug the instance from step 6.
There is a video here that goes through the steps and fixing a bug in a little more detail.
Remove the settings from steps 3 and 4 to go back to FSAC bundled in Ionide extension.
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
IMPORTANT: By submitting a patch, you agree that your work will be licensed under the license used by the project.
If you have any large pull request in mind (e.g. implementing features, refactoring code, etc), please ask first otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
Please adhere to the coding conventions in the project (indentation, accurate comments, etc.).
A bug is either a demonstrable problem that is caused in Ionide failing to provide the expected feature or indicate missing, unclear, or misleading documentation. Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
-
Use the GitHub issue search — check if the issue has already been reported.
-
Check if the issue has been fixed — try to reproduce it using the
master
branch in the repository. -
Isolate and report the problem — ideally create a reduced test case.
Please try to be as detailed as possible in your report. Include information about
your Operating System, as well as your dotnet
(or mono
\ .NET Framework), and F# versions. Please provide steps to
reproduce the issue as well as the outcome you were expecting! All these details
will help developers to fix any potential bugs.
Ionide provide an easy way to gather all this information:
Do Ctrl+Shift+P > F#: Get info for diagnostics
, this will open a file with something like:
- Operating system: Darwin
- Arch: x64
- VSCode: 1.23.1
- Runtime: netcore
- Dotnet version: 2.1.103
Now, you can copy/paste this file in the issue on github and fill the gaps. You can let the lines started by <!--
they will not be displayed by github.
Feature requests are welcome and should be discussed on issue tracker. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the community of the merits of this feature. Please provide as much detail and context as possible.
- Dependencies
- If updating FSAC
- run
dotnet paket update --group fsac
- Commit the
paket.lock
- run
- If updating ionide-grammar
open paket.lock
- find the line
remote: https://github.com/ionide/ionide-fsgrammar.git
- update the hash to the latest commit on the main branch
- Commit the
paket.lock
- if updating ionide-vscode-helpers
- open
paket.dependencies
- find the lines for
github ionide/ionide-vscode-helpers
- Update the hash for all the files
- run
dotnet paket install
- Commit the
paket.dependencies
andpaket.lock
- open
- If updating FSAC
- Add version and notes to
RELEASE_NOTES.md
- If possible link the pull request of the changes and mention the author of the pull request
- If updating FSAC mention the version of FSAC that is being updated to and link it's release notes
- Commit
RELEASE_NOTES.md
git commit -m "Bump version to x.x.x"
git push [remote-branch] main
- Goto the Release workflow on Github Action
- Click
Run workflow
in the upper right - Click
Run workflow
button on the dialog that pops up
- Click