Skip to content
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

fix(extensions/#2974): Add extension override for Ionide.Ionide-fsharp #3019

Merged
merged 3 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_CURRENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- #3007 - Extensions: Show 'missing dependency' activation error to user
- #3011 - Vim: Visual Block - Handle 'I' and 'A' in visual block mode (fixes #1633)
- #3016 - Extensions: Fix memory leak in extension host language features (fixes #3009)
- #3019 - Extensions: Fix activation error for Ionide.Ionide-fsharp extension (fixes #2974)

### Performance

Expand Down
25 changes: 25 additions & 0 deletions src/Exthost/Extension/InitData.re
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ module Identifier = {
};

module Hacks = {
let patchIonideDependencies = (dependencies: list(Yojson.Safe.t)) => {
dependencies
|> List.map(
fun
| `String(str) =>
if (str == "ms-dotnettools.csharp") {
`String("muhammad-sammy.csharp");
} else {
`String(str);
}
| json => json,
);
};

// TEMPORARY workarounds for external bugs blocking extensions
let hacks = [
// Workaround for https://github.com/open-vsx/publish-extensions/issues/106
Expand All @@ -25,6 +39,17 @@ module Hacks = {
| _ => Some(`String("2020-08-04")),
),
),
(
// Workaround for https://github.com/onivim/oni2/issues/2974
"ionide.ionide-fsharp",
Utility.JsonEx.update(
"extensionDependencies",
fun
| Some(`List(dependencies)) =>
Some(`List(dependencies |> patchIonideDependencies))
| json => json,
),
),
];

let apply = (~extensionId, initDataJson) => {
Expand Down