)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000038,"name":"Jan Schär","display_name":"Jan","email":"jan@monogon.tech","username":"jan","avatars":[{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"ade86a434ace93e25332b68156fc75ef60c4778a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"35f18dc0_af3973ea","updated":"2024-06-24 12:19:11.000000000","message":"I got it to work by configuring VS Code as documented here: https://github.com/bazelbuild/rules_go/wiki/Editor-setup\nCould you add some text containing this link and the path to gopackagesdriver to SETUP.md?\n\nnix-shell is not needed, I do not even have nix installed.\n\nI changed the gopackagesdriver file to the following, which greatly reduces CPU usage and also makes the `sqlc_go_library` error go away:\n\n```bash\n#!/usr/bin/env bash\nargs\u003d()\nfor var; do\n  # Stop gopls from loading the entire monorepo.\n  # It will still load opened files and their dependencies on demand.\n  [[ $var !\u003d \u0027./...\u0027 ]] \u0026\u0026 args+\u003d(\"$var\")\ndone\nexec bazel run -- @io_bazel_rules_go//go/tools/gopackagesdriver \"${args[@]}\"\n```\n\nHere is my `.vscode/settings.json`:\n```json\n{\n  // These two lines are not really needed. By default it uses ~/go for these.\n  \"go.toolsGopath\": \"/home/jan/Documents/monogon/tools/vscode-gotools\",\n  \"go.gopath\": \"/home/jan/Documents/monogon/tools/vscode-gopath\",\n\n  \"go.goroot\": \"${workspaceFolder}/bazel-monogon/external/go_sdk\",\n  \"go.toolsEnvVars\": {\n    \"GOPACKAGESDRIVER\": \"${workspaceFolder}/tools/gopackagesdriver\",\n  },\n  \"go.enableCodeLens\": {\n    \"runtest\": false\n  },\n  \"gopls\": {\n    \"build.directoryFilters\": [\n      \"-bazel-bin\",\n      \"-bazel-out\",\n      \"-bazel-testlogs\",\n      \"-bazel-monogon\",\n    ],\n    \"formatting.local\": \"source.monogon.dev\",\n    \"ui.semanticTokens\": true,\n  },\n}\n\n```","commit_id":"db4d5a67ec919a929c6e24dd109a571028f7852b"},{"author":{"_account_id":1000038,"name":"Jan Schär","display_name":"Jan","email":"jan@monogon.tech","username":"jan","avatars":[{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"c22327ce1d7aa26f440ee5fc222c162b9a98cca3","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6922e77a_cc21f1fd","in_reply_to":"1a9c7d5a_04fd54cd","updated":"2024-07-02 08:14:20.000000000","message":"After change 3187, it now works better without my modifications to the gopackagesdriver wrapper. The continuous CPU usage was apparently caused by an animated loading icon that VS Code showed next to the error message, which is now gone.\n\nPlease remove the comment about nix-shell or state that it only applies on NixOS, and then we can merge this.\n\nI improved my `.vscode/settings.json` to something that should work for others as well. Many other projects have such a file in the repo, so I agree that it makes sense to add it to the repo. Now we just have to figure out if we can make one configuration file that also works on NixOS.\n\n```\n{\n  \"files.eol\": \"\\n\",\n  \"files.trimTrailingWhitespace\": true,\n  \"files.trimFinalNewlines\": true,\n  \"files.insertFinalNewline\": true,\n  \"go.goroot\": \"${workspaceFolder}/bazel-${workspaceFolderBasename}/external/go_sdk\",\n  \"go.toolsEnvVars\": {\n    \"GOPACKAGESDRIVER\": \"${workspaceFolder}/tools/gopackagesdriver\",\n  },\n  \"go.enableCodeLens\": {\n    \"runtest\": false,\n  },\n  \"go.lintOnSave\": \"off\",\n  \"gopls\": {\n    \"formatting.local\": \"source.monogon.dev\",\n    \"ui.semanticTokens\": true,\n    \"ui.codelenses\": {\n      \"gc_details\": false,\n      \"regenerate_cgo\": false,\n      \"generate\": false,\n      \"test\": false,\n      \"tidy\": false,\n      \"upgrade_dependency\": false,\n      \"vendor\": false,\n    },\n  },\n}\n```","commit_id":"db4d5a67ec919a929c6e24dd109a571028f7852b"},{"author":{"_account_id":1000000,"name":"Leopold Schabel","display_name":"Leo","email":"leo@monogon.tech","username":"leo","avatars":[{"url":"https://www.gravatar.com/avatar/98f8f79a6bb45adef37defa7ead8f3d2.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/98f8f79a6bb45adef37defa7ead8f3d2.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/98f8f79a6bb45adef37defa7ead8f3d2.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/98f8f79a6bb45adef37defa7ead8f3d2.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"43a8ba99a2c43a652ff87bb0754ffb1e8cdbe26e","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ee8bc8c5_1d88da83","in_reply_to":"35f18dc0_af3973ea","updated":"2024-06-30 13:02:53.000000000","message":"Cool - we should probably add the `.vscode/settings.json` to the repo if we can make it workspace-relative?","commit_id":"db4d5a67ec919a929c6e24dd109a571028f7852b"},{"author":{"_account_id":1000001,"name":"Lorenz Brun","display_name":"Lorenz","email":"lorenz@monogon.tech","username":"lorenz","avatars":[{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"31d61f3fbfe49835ebf378fd9edebab9f6ddae16","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ab70b9e5_e2c6a4d8","in_reply_to":"6922e77a_cc21f1fd","updated":"2024-07-02 14:33:34.000000000","message":"Acknowledged","commit_id":"db4d5a67ec919a929c6e24dd109a571028f7852b"},{"author":{"_account_id":1000001,"name":"Lorenz Brun","display_name":"Lorenz","email":"lorenz@monogon.tech","username":"lorenz","avatars":[{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"3bea270fa9bb16fd45bc77da7f89fad39601839b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a9c7d5a_04fd54cd","in_reply_to":"ee8bc8c5_1d88da83","updated":"2024-07-01 14:03:03.000000000","message":"I have a .vscode/settings.json file, but there is still work left to be done for that.","commit_id":"db4d5a67ec919a929c6e24dd109a571028f7852b"}]}
