Skip to content

Commit 4acb01d

Browse files
authored
Merge pull request #3539 from OmniSharp/dev/jorobich/update-required-mono
Update minimum Mono version to 6.6.0
2 parents 6b97ec9 + ba98810 commit 4acb01d

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ language: node_js
33
node_js:
44
- "10"
55

6+
mono:
7+
- latest
8+
69
env:
710
- CODE_VERSION=1.33.0
811

src/omnisharp/OmniSharpMonoResolver.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { MonoInformation } from '../constants/MonoInformation';
1111
import { IGetMonoVersion } from '../constants/IGetMonoVersion';
1212

1313
export class OmniSharpMonoResolver implements IMonoResolver {
14-
private minimumMonoVersion = "5.8.1";
14+
private minimumMonoVersion = "6.6.0";
15+
1516
constructor(private getMonoVersion: IGetMonoVersion) {
1617
}
1718

test/unitTests/omnisharp/OmniSharpMonoResolver.test.ts

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
1616
let getMonoCalled: boolean;
1717
let environment: NodeJS.ProcessEnv;
1818
let options: Options;
19+
1920
const monoPath = "monoPath";
21+
22+
const lowerMonoVersion = "6.4.0";
23+
const requiredMonoVersion = "6.6.0";
24+
const higherMonoVersion = "6.8.0";
25+
2026
const getMono = (version: string) => async(env: NodeJS.ProcessEnv) => {
2127
getMonoCalled = true;
2228
environment = env;
@@ -28,8 +34,8 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
2834
options = getEmptyOptions();
2935
});
3036

31-
test("it returns undefined if the version is less than 5.8.1 and useGlobalMono is auto", async () => {
32-
let monoResolver = new OmniSharpMonoResolver(getMono("5.0.0"));
37+
test(`it returns undefined if the version is less than ${requiredMonoVersion} and useGlobalMono is auto`, async () => {
38+
let monoResolver = new OmniSharpMonoResolver(getMono(lowerMonoVersion));
3339
let monoInfo = await monoResolver.getGlobalMonoInfo({
3440
...options,
3541
useGlobalMono: "auto",
@@ -39,7 +45,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
3945
});
4046

4147
test("it returns undefined if useGlobalMono is never", async () => {
42-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.2"));
48+
let monoResolver = new OmniSharpMonoResolver(getMono(higherMonoVersion));
4349
let monoInfo = await monoResolver.getGlobalMonoInfo({
4450
...options,
4551
useGlobalMono: "never",
@@ -48,32 +54,32 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
4854
expect(monoInfo).to.be.undefined;
4955
});
5056

51-
test("it returns the path and version if the version is greater than or equal to 5.8.1 and getGlobalMonoInfo is always", async () => {
52-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.1"));
57+
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is always`, async () => {
58+
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
5359
let monoInfo = await monoResolver.getGlobalMonoInfo({
5460
...options,
5561
useGlobalMono: "always",
5662
monoPath: monoPath
5763
});
5864

59-
expect(monoInfo.version).to.be.equal("5.8.1");
65+
expect(monoInfo.version).to.be.equal(requiredMonoVersion);
6066
expect(monoInfo.path).to.be.equal(monoPath);
6167
});
6268

63-
test("it returns the path and version if the version is greater than or equal to 5.8.1 and getGlobalMonoInfo is auto", async () => {
64-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.2"));
69+
test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion} and getGlobalMonoInfo is auto`, async () => {
70+
let monoResolver = new OmniSharpMonoResolver(getMono(higherMonoVersion));
6571
let monoInfo = await monoResolver.getGlobalMonoInfo({
6672
...options,
6773
useGlobalMono: "auto",
6874
monoPath: monoPath
6975
});
7076

71-
expect(monoInfo.version).to.be.equal("5.8.2");
77+
expect(monoInfo.version).to.be.equal(higherMonoVersion);
7278
expect(monoInfo.path).to.be.equal(monoPath);
7379
});
7480

75-
test("it throws exception if getGlobalMonoInfo is always and version<5.8.1", async () => {
76-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.0"));
81+
test(`it throws exception if getGlobalMonoInfo is always and version<${requiredMonoVersion}`, async () => {
82+
let monoResolver = new OmniSharpMonoResolver(getMono(lowerMonoVersion));
7783

7884
await expect(monoResolver.getGlobalMonoInfo({
7985
...options,
@@ -83,7 +89,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
8389
});
8490

8591
test("sets the environment with the monoPath id useGlobalMono is auto", async () => {
86-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.1"));
92+
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
8793
let monoInfo = await monoResolver.getGlobalMonoInfo({
8894
...options,
8995
useGlobalMono: "auto",
@@ -95,7 +101,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
95101
});
96102

97103
test("sets the environment with the monoPath id useGlobalMono is always", async () => {
98-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.1"));
104+
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
99105
let monoInfo = await monoResolver.getGlobalMonoInfo({
100106
...options,
101107
useGlobalMono: "auto",
@@ -107,7 +113,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
107113
});
108114

109115
test("doesn't set the environment with the monoPath if useGlobalMono is never", async () => {
110-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.1"));
116+
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
111117
await monoResolver.getGlobalMonoInfo({
112118
...options,
113119
useGlobalMono: "never",
@@ -120,7 +126,7 @@ suite(`${OmniSharpMonoResolver.name}`, () => {
120126
});
121127

122128
test("getMono is called with the environment that includes the monoPath if the useGlobalMono is auto or always", async () => {
123-
let monoResolver = new OmniSharpMonoResolver(getMono("5.8.1"));
129+
let monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion));
124130
await monoResolver.getGlobalMonoInfo({
125131
...options,
126132
useGlobalMono: "auto",

0 commit comments

Comments
 (0)