Skip to content

Commit

Permalink
Merge pull request #154 from janpfeifer/lsp
Browse files Browse the repository at this point in the history
go.lsp.dev down
  • Loading branch information
janpfeifer authored Jan 28, 2025
2 parents 7afc861 + 7193918 commit b5f4ff3
Show file tree
Hide file tree
Showing 22 changed files with 140 additions and 404 deletions.
9 changes: 9 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# GoNB Changelog


## Next

* Added a `replace` directive from `go.lsp.dev/{jsonrpc2,uri,protocol}` to `github.com/go-language-server/{jsonrpc2,uri,protocol}`
in `go.mod`, since `go.lsp.dev` seems to be down.
* Updated dependencies to `go.lsp.dev/uri` and `go.lsp.dev/protocol`.
* Set MIMEType KernelLanguageInfo.MIMEType, which enabled auto-complete with VSCode+Polyglot to work with GoNB+Auto-complete.
Thanks @tonidy for the find and fix. More in https://github.com/dotnet/interactive/issues/3511

## v0.10.7, 2025/01/20

* Improved `autostart` logic: it now requires being mounted as "readonly" under `/root/autostart`.
Expand Down
4 changes: 2 additions & 2 deletions docs/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ github.com/janpfeifer/gonb/version.go init 100.0%
github.com/janpfeifer/gonb/cache/cache.go New 75.0%
github.com/janpfeifer/gonb/cache/cache.go AssertNoError 50.0%
github.com/janpfeifer/gonb/cache/cache.go MustNew 100.0%
github.com/janpfeifer/gonb/cache/cache.go NewInTmp 72.7%
github.com/janpfeifer/gonb/cache/cache.go NewInTmp 68.2%
github.com/janpfeifer/gonb/cache/cache.go MustNewInTmp 100.0%
github.com/janpfeifer/gonb/cache/cache.go NewHidden 80.0%
github.com/janpfeifer/gonb/cache/cache.go MustNewHidden 100.0%
Expand Down Expand Up @@ -301,7 +301,7 @@ github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go *Client.CallComp
github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go *Client.callCompleteLocked 0.0%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go *Client.ConsumeMessages 0.0%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go trimString 66.7%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go *Client.Handler 44.4%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/conn.go *Client.Handler 48.4%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/exec.go *Client.Start 79.6%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/exec.go *Client.Stop 0.0%
github.com/janpfeifer/gonb/internal/goexec/goplsclient/exec.go *Client.WaitConnection 0.0%
Expand Down
6 changes: 3 additions & 3 deletions examples/tests/bash_script.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/tmp/gonb_8e54badc\n"
"/tmp/gonb_dec188e3\n"
]
}
],
Expand All @@ -59,7 +59,7 @@
"output_type": "stream",
"text": [
"/home/janpf/Projects/gonb/examples/tests\n",
"/tmp/gonb_8e54badc\n",
"/tmp/gonb_dec188e3\n",
"/home/janpf/Projects/gonb\n",
"/home/janpf/Projects/gonb\n"
]
Expand All @@ -82,7 +82,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/capture.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/comms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
6 changes: 3 additions & 3 deletions examples/tests/dom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_77b0e411\"></div>"
"<div id=\"dom.transient_div_ed84d56c\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -152,7 +152,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_1889e174\"></div>"
"<div id=\"dom.transient_div_fda1031a\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -193,7 +193,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
10 changes: 5 additions & 5 deletions examples/tests/goflags.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"gonb_a636feef/main.go:8:\tA\t\t100.0%\n",
"gonb_a636feef/main.go:12:\tB\t\t0.0%\n",
"gonb_a636feef/main.go:17:\tmain\t\t100.0%\n",
"gonb_6d78d1c9/main.go:8:\tA\t\t100.0%\n",
"gonb_6d78d1c9/main.go:12:\tB\t\t0.0%\n",
"gonb_6d78d1c9/main.go:17:\tmain\t\t100.0%\n",
"total\t\t\t\t(statements)\t75.0%\n"
]
}
Expand Down Expand Up @@ -238,7 +238,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"# gonb_a636feef\n",
"# gonb_6d78d1c9\n",
"./main.go:10:6: can inline (*Point).ManhattanLen\n",
"./main.go:16:12: inlining call to flag.Parse\n",
"./main.go:18:27: inlining call to (*Point).ManhattanLen\n",
Expand All @@ -263,7 +263,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
4 changes: 2 additions & 2 deletions examples/tests/gonbui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"output_type": "stream",
"text": [
"%goflags=[\"--cover\" \"--covermode=set\"]\n",
"GOCOVERDIR=/tmp/gonb_test_coverage.KXrPgksOg4\n"
"GOCOVERDIR=/tmp/gonb_test_coverage.MljL9OTplr\n"
]
}
],
Expand Down Expand Up @@ -129,7 +129,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
14 changes: 7 additions & 7 deletions examples/tests/gotest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@
"text": [
"goos: linux\n",
"goarch: amd64\n",
"pkg: gonb_348f5fd7\n",
"pkg: gonb_57055275\n",
"cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n",
"BenchmarkFibonacciA32\n",
"BenchmarkFibonacciA32-24 \t 181\t 6584232 ns/op\n",
"BenchmarkFibonacciA32-24 \t 172\t 6559009 ns/op\n",
"BenchmarkFibonacciB32\n",
"BenchmarkFibonacciB32-24 \t301803614\t 3.994 ns/op\n",
"BenchmarkFibonacciB32-24 \t350945394\t 3.942 ns/op\n",
"PASS\n",
"coverage: [no statements]\n"
]
Expand Down Expand Up @@ -334,10 +334,10 @@
"text": [
"goos: linux\n",
"goarch: amd64\n",
"pkg: gonb_348f5fd7\n",
"pkg: gonb_57055275\n",
"cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n",
"BenchmarkFibonacciA32-24 \t 177\t 6570735 ns/op\n",
"BenchmarkFibonacciB32-24 \t341224015\t 3.960 ns/op\n",
"BenchmarkFibonacciA32-24 \t 172\t 6583831 ns/op\n",
"BenchmarkFibonacciB32-24 \t309453978\t 3.894 ns/op\n",
"PASS\n",
"coverage: [no statements]\n"
]
Expand All @@ -357,7 +357,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
14 changes: 7 additions & 7 deletions examples/tests/gowork.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/tmp/gonb_tests_gowork_k5qMEYlN"
"/tmp/gonb_tests_gowork_Xocdresp"
]
}
],
Expand Down Expand Up @@ -64,7 +64,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Temporary test package: /tmp/gonb_tests_gowork_k5qMEYlN\n"
"Temporary test package: /tmp/gonb_tests_gowork_Xocdresp\n"
]
}
],
Expand Down Expand Up @@ -136,7 +136,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\t- Added replace rule for module \"a.com/a/pkg\" to local directory \"/tmp/gonb_tests_gowork_k5qMEYlN\".\n"
"\t- Added replace rule for module \"a.com/a/pkg\" to local directory \"/tmp/gonb_tests_gowork_Xocdresp\".\n"
]
}
],
Expand All @@ -155,7 +155,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"module gonb_c5afeb93\n",
"module gonb_bedb8330\n",
"\n",
"go 1.23.5\n",
"\n",
Expand Down Expand Up @@ -186,7 +186,7 @@
"text/html": [
"<b>List of files/directories being tracked:</b>\n",
"<ul>\n",
"<li>/tmp/gonb_tests_gowork_k5qMEYlN</li>\n",
"<li>/tmp/gonb_tests_gowork_Xocdresp</li>\n",
"</ul>\n"
]
},
Expand All @@ -208,7 +208,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"module gonb_c5afeb93\n",
"module gonb_bedb8330\n",
"\n",
"go 1.23.5\n"
]
Expand Down Expand Up @@ -276,7 +276,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/hello.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/init.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
4 changes: 2 additions & 2 deletions examples/tests/input_boxes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"output_type": "stream",
"text": [
"%goflags=[\"--cover\" \"--covermode=set\"]\n",
"GOCOVERDIR=/tmp/gonb_test_coverage.KXrPgksOg4\n"
"GOCOVERDIR=/tmp/gonb_test_coverage.MljL9OTplr\n"
]
}
],
Expand Down Expand Up @@ -192,7 +192,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/script.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
4 changes: 2 additions & 2 deletions examples/tests/vartuple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"text/html": [
"<h4>Variables</h4>\n",
"<ul>\n",
"<li><pre>_~840487</pre></li>\n",
"<li><pre>_~478741</pre></li>\n",
"<li><pre>a</pre></li>\n",
"<li><pre>c</pre></li>\n",
"</ul>"
Expand Down Expand Up @@ -121,7 +121,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
8 changes: 4 additions & 4 deletions examples/tests/widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_55acb47e\"></div>"
"<div id=\"dom.transient_div_27aad3ca\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -189,7 +189,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_28380cd2\"></div>"
"<div id=\"dom.transient_div_1b8a0aba\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -304,7 +304,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_222cc2d0\"></div>"
"<div id=\"dom.transient_div_df6ed517\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -412,7 +412,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
6 changes: 3 additions & 3 deletions examples/tests/writefile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Cell contents written to \"/tmp/gonb_nbtests_writefile_42543885/poetry.txt\".\n"
"Cell contents written to \"/tmp/gonb_nbtests_writefile_3076514072/poetry.txt\".\n"
]
}
],
Expand All @@ -32,7 +32,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Cell contents appended to \"/tmp/gonb_nbtests_writefile_42543885/poetry.txt\".\n"
"Cell contents appended to \"/tmp/gonb_nbtests_writefile_3076514072/poetry.txt\".\n"
]
}
],
Expand All @@ -51,7 +51,7 @@
"language_info": {
"codemirror_mode": "",
"file_extension": ".go",
"mimetype": "",
"mimetype": "text/x-go",
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
Expand Down
Loading

0 comments on commit b5f4ff3

Please sign in to comment.