Skip to content

Commit 793ba6d

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

File tree

11 files changed

+109
-137
lines changed

11 files changed

+109
-137
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: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/src/Connection/Endpoint/Connection__Endpoint__Agda.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/Connection/Transport/Connection__Transport__Process.bs.js

Lines changed: 18 additions & 7 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: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ module Module: Module = {
109109
}
110110

111111
// see if it's a Agda executable or a language server
112-
let probeFilepath = async path =>
112+
let probeFilepath = async path => {
113+
Js.log("[ LOG ][ Connection.probeFilepath ] Input path: " ++ path)
113114
switch URI.parse(path) {
114115
| Connection__URI.LspURI(_) => Error(Error.Probe.CannotHandleURLsAtTheMoment)
115116
| FileURI(_, vscodeUri) =>
116-
let path = VSCode.Uri.fsPath(vscodeUri)
117+
let fsPath = VSCode.Uri.fsPath(vscodeUri)
118+
Js.log("[ LOG ][ Connection.probeFilepath ] VSCode.Uri.fsPath result: " ++ fsPath)
117119
let result = await Connection__Process__Exec.run(path, ["--version"], ~timeout=3000)
118120
switch result {
119121
| Ok(output) =>
@@ -136,11 +138,13 @@ module Module: Module = {
136138
}
137139
| Error(error) => Error(Error.Probe.CannotDetermineAgdaOrALS(error))
138140
}
139-
}
141+
}}
140142

141143
let makeWithRawPath = async (rawpath: string): result<t, Error.Establish.t> => {
144+
Js.log("[ LOG ][ Connection.makeWithRawPath ] Input rawpath: " ++ rawpath)
142145
switch await probeFilepath(rawpath) {
143146
| Ok(path, Ok(agdaVersion)) =>
147+
Js.log("[ LOG ][ Connection.makeWithRawPath ] Passing to Agda.make: " ++ rawpath)
144148
let connection = await Agda.make(rawpath, agdaVersion)
145149
Ok(Agda(connection, path, agdaVersion))
146150
| Ok(path, Error(alsVersion, agdaVersion, lspOptions)) =>
@@ -322,9 +326,11 @@ module Module: Module = {
322326
}
323327

324328
let sendRequest = async (connection, document, request, handler) => {
329+
Js.log("[ LOG ] Sending request: " ++ Request.toString(request))
325330
// encode the Request to some string
326331
let encodeRequest = (document, version) => {
327332
let filepath = document->VSCode.TextDocument.fileName->Parser.filepath
333+
Js.log("[ LOG ] original filepath: " ++ filepath)
328334
let libraryPath = Config.getLibraryPath()
329335
let highlightingMethod = Config.Highlighting.getHighlightingMethod()
330336
let backend = Config.getBackend()

src/Connection/Endpoint/Connection__Endpoint__Agda.res

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

9191
let make = async (path, version) => {
92+
Js.log("[ LOG ][ Agda.make ] Received path: " ++ path)
9293
let args = Array.concat(["--interaction"], Config.Connection.getCommandLineOptions())
9394
let conn = {
9495
process: Process.make(path, args),

0 commit comments

Comments
 (0)