Skip to content

Commit 1e225c3

Browse files
committed
[ test ] Trying to figure out what happened on Windows
1 parent 2fb379b commit 1e225c3

File tree

9 files changed

+59
-119
lines changed

9 files changed

+59
-119
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
matrix:
24-
os: [windows-latest, ubuntu-latest, macos-latest]
25-
agda: ["Agda-2.6.3", "Agda-2.6.4", "Agda-2.7.0"]
24+
# os: [windows-latest, ubuntu-latest, macos-latest]
25+
os: [windows-latest]
26+
# agda: ["Agda-2.6.3", "Agda-2.6.4", "Agda-2.7.0"]
27+
agda: ["Agda-2.7.0"]
2628
fail-fast: false
2729

2830
# Steps represent a sequence of tasks that will be executed as part of the job

lib/js/src/Connection/Connection.bs.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/src/Main/Main.bs.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/tests/Test__Auto.bs.js

Lines changed: 3 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/tests/Test__Util.bs.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Connection/Connection.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ module Module: Module = {
322322
}
323323

324324
let sendRequest = async (connection, document, request, handler) => {
325+
Js.log("[ LOG ] Sending request: " ++ Request.toString(request))
325326
// encode the Request to some string
326327
let encodeRequest = (document, version) => {
327328
let filepath = document->VSCode.TextDocument.fileName->Parser.filepath

src/Main/Main.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ let activateWithoutContext = (
213213
log: Chan.make(),
214214
}
215215
// subscribe to the logging channel when in debug mode
216-
let debug = false
216+
let debug = true
217217
if debug {
218218
// log the event
219219
channels.log

test/tests/Test__Auto.res

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,61 +36,61 @@ let run = normalization => {
3636
}
3737
})
3838

39-
Async.it("should be responded with correct responses 2", async () => {
40-
let ctx = await AgdaMode.makeAndLoad("Auto.agda")
39+
// Async.it("should be responded with correct responses 2", async () => {
40+
// let ctx = await AgdaMode.makeAndLoad("Auto.agda")
4141

42-
let responses = switch Goals.getGoalByIndex(ctx.state.goals, 1) {
43-
| Some(goal) =>
44-
await ctx.state->State__Connection.sendRequestAndCollectResponses(
45-
Request.Auto(normalization, goal),
46-
)
47-
| None => []
48-
}
42+
// let responses = switch Goals.getGoalByIndex(ctx.state.goals, 1) {
43+
// | Some(goal) =>
44+
// await ctx.state->State__Connection.sendRequestAndCollectResponses(
45+
// Request.Auto(normalization, goal),
46+
// )
47+
// | None => []
48+
// }
4949

50-
let filteredResponses = responses->Array.filter(filteredResponse)
50+
// let filteredResponses = responses->Array.filter(filteredResponse)
5151

52-
switch ctx.state.agdaVersion {
53-
| Some(version) =>
54-
if Util.Version.gte(version, "2.7.0") {
55-
Assert.deepStrictEqual(
56-
filteredResponses,
57-
[GiveAction(1, GiveString("n")), InteractionPoints([0])],
58-
)
59-
} else {
60-
Assert.deepStrictEqual(
61-
filteredResponses,
62-
[
63-
GiveAction(1, GiveString("m")),
64-
DisplayInfo(AllGoalsWarnings("*All Goals*", "?0 : ℕ\n")),
65-
InteractionPoints([0]),
66-
],
67-
)
68-
}
69-
| None => Assert.fail("No Agda version found")
70-
}
71-
})
52+
// switch ctx.state.agdaVersion {
53+
// | Some(version) =>
54+
// if Util.Version.gte(version, "2.7.0") {
55+
// Assert.deepStrictEqual(
56+
// filteredResponses,
57+
// [GiveAction(1, GiveString("n")), InteractionPoints([0])],
58+
// )
59+
// } else {
60+
// Assert.deepStrictEqual(
61+
// filteredResponses,
62+
// [
63+
// GiveAction(1, GiveString("m")),
64+
// DisplayInfo(AllGoalsWarnings("*All Goals*", "?0 : ℕ\n")),
65+
// InteractionPoints([0]),
66+
// ],
67+
// )
68+
// }
69+
// | None => Assert.fail("No Agda version found")
70+
// }
71+
// })
7272
}
7373

7474
describe("agda-mode.auto", () => {
7575
This.timeout(4000)
7676

77-
// testing for Auto somehow hangs on GitHub Actions Windows runners (but works fine on my desktop Windows :))
78-
// cannot find out why, so skip the tests on Windows for now
79-
if OS.onUnix {
80-
describe("AsIs", () => {
77+
// // testing for Auto somehow hangs on GitHub Actions Windows runners (but works fine on my desktop Windows :))
78+
// // cannot find out why, so skip the tests on Windows for now
79+
// if OS.onUnix {
80+
describe_only("AsIs", () => {
8181
run(AsIs)
8282
})
8383

84-
describe("Simplified", () => {
85-
run(Simplified)
86-
})
84+
// describe("Simplified", () => {
85+
// run(Simplified)
86+
// })
8787

88-
describe("Normalised", () => {
89-
run(Normalised)
90-
})
88+
// describe("Normalised", () => {
89+
// run(Normalised)
90+
// })
9191

92-
describe("HeadNormal", () => {
93-
run(HeadNormal)
94-
})
95-
}
92+
// describe("HeadNormal", () => {
93+
// run(HeadNormal)
94+
// })
95+
// }
9696
})

test/tests/Test__Util.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ module AgdaMode = {
407407
}
408408
})
409409
let _ = await File.open_(filepath) // need to open the file first somehow
410+
Js.log("[ LOG ] About ot load " ++ filepath)
410411
switch await executeCommand("agda-mode.load") {
411412
| None => raise(Failure("Cannot load " ++ filepath))
412413
| Some(Ok(state)) =>

0 commit comments

Comments
 (0)