-
Notifications
You must be signed in to change notification settings - Fork 686
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
Support using .NET 6 OmniSharp #4926
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1f36112
Support using .NET 6 OmniSharp
333fred 75f31d1
Fix default options.
333fred a344c0c
Merge branch 'master' into net6
333fred dbd9570
Add missing package elements
333fred 00267a2
Correct pcakge paths.
333fred 0726e24
Run the .NET 6 build with `dotnet OmniSharp.dll`, rather than `OmniSh…
333fred 93dfaf5
Correct and clarify dotnet resolver logic.
333fred File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,48 +5,56 @@ | |
|
||
import { Package } from "../packageManager/Package"; | ||
|
||
export function GetPackagesFromVersion(version: string, runTimeDependencies: Package[], serverUrl: string, installPath: string): Package[] { | ||
export const modernNetVersion = "6.0"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed OmniSharp/omnisharp-roslyn#2294 to track removing the need for this constant. |
||
|
||
export function GetPackagesFromVersion(version: string, useFramework: boolean, runTimeDependencies: Package[], serverUrl: string, installPath: string): Package[] { | ||
if (!version) { | ||
throw new Error('Invalid version'); | ||
} | ||
|
||
let versionPackages = new Array<Package>(); | ||
for (let inputPackage of runTimeDependencies) { | ||
if (inputPackage.platformId) { | ||
versionPackages.push(SetBinaryAndGetPackage(inputPackage, serverUrl, version, installPath)); | ||
if (inputPackage.platformId && inputPackage.isFramework === useFramework) { | ||
versionPackages.push(SetBinaryAndGetPackage(inputPackage, useFramework, serverUrl, version, installPath)); | ||
} | ||
} | ||
|
||
return versionPackages; | ||
} | ||
|
||
export function SetBinaryAndGetPackage(inputPackage: Package, serverUrl: string, version: string, installPath: string): Package { | ||
export function SetBinaryAndGetPackage(inputPackage: Package, useFramework: boolean, serverUrl: string, version: string, installPath: string): Package { | ||
let installBinary: string; | ||
if (inputPackage.platformId === "win-x86" || inputPackage.platformId === "win-x64") { | ||
installBinary = "OmniSharp.exe"; | ||
} | ||
else if (!useFramework) { | ||
installBinary = 'OmniSharp'; | ||
} | ||
else { | ||
installBinary = "run"; | ||
} | ||
|
||
return GetPackage(inputPackage, serverUrl, version, installPath, installBinary); | ||
return GetPackage(inputPackage, useFramework, serverUrl, version, installPath, installBinary); | ||
} | ||
|
||
function GetPackage(inputPackage: Package, serverUrl: string, version: string, installPath: string, installBinary: string): Package { | ||
function GetPackage(inputPackage: Package, useFramework: boolean, serverUrl: string, version: string, installPath: string, installBinary: string): Package { | ||
if (!version) { | ||
throw new Error('Invalid version'); | ||
} | ||
|
||
const packageSuffix = useFramework ? '' : `-net${modernNetVersion}`; | ||
|
||
let versionPackage: Package = { | ||
id: inputPackage.id, | ||
description: `${inputPackage.description}, Version = ${version}`, | ||
url: `${serverUrl}/releases/${version}/omnisharp-${inputPackage.platformId}.zip`, | ||
installPath: `${installPath}/${version}`, | ||
installTestPath: `./${installPath}/${version}/${installBinary}`, | ||
url: `${serverUrl}/releases/${version}/omnisharp-${inputPackage.platformId}${packageSuffix}.zip`, | ||
installPath: `${installPath}/${version}${packageSuffix}`, | ||
installTestPath: `./${installPath}/${version}${packageSuffix}/${installBinary}`, | ||
platforms: inputPackage.platforms, | ||
architectures: inputPackage.architectures, | ||
binaries: inputPackage.binaries, | ||
platformId: inputPackage.platformId | ||
platformId: inputPackage.platformId, | ||
isFramework: useFramework | ||
}; | ||
|
||
return versionPackage; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
I think you are missing a split into x64 and arm64 here
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.
good catch. We don't have one currently, because we install the x64 for both architectures. Since the net6 builds are currently being built as self-contained this might cause issues. Certainly wouldn't perform as well.
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.
I added profiles for the other platforms. @filipw, can you give it a try on Mac?
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.
I went through this list and updated our profiles based on it, from the beta83 publish of omnisharp-roslyn: