Title: `go run` fails because of replace directive · Issue #4397 · sqlc-dev/sqlc · GitHub
Open Graph Title: `go run` fails because of replace directive · Issue #4397 · sqlc-dev/sqlc
X Title: `go run` fails because of replace directive · Issue #4397 · sqlc-dev/sqlc
Description: Version 1.31.0 What happened? I suddenly get an error from the go toolchain when it tries to download / run sqlc (see below). Relevant log output go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest vet go: github.com/sqlc-dev/sqlc/cmd/sqlc@l...
Open Graph Description: Version 1.31.0 What happened? I suddenly get an error from the go toolchain when it tries to download / run sqlc (see below). Relevant log output go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest vet...
X Description: Version 1.31.0 What happened? I suddenly get an error from the go toolchain when it tries to download / run sqlc (see below). Relevant log output go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest vet...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/4397
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`go run` fails because of replace directive","articleBody":"### Version\n\n1.31.0\n\n### What happened?\n\nI suddenly get an error from the go toolchain when it tries to download / run sqlc (see below).\n\n### Relevant log output\n\n```shell\ngo run github.com/sqlc-dev/sqlc/cmd/sqlc@latest vet\ngo: github.com/sqlc-dev/sqlc/cmd/sqlc@latest (in github.com/sqlc-dev/sqlc@v1.31.0):\n The go.mod file for the module providing named packages contains one or\n more replace directives. It must not contain directives that would cause\n it to be interpreted differently than if it were the main module.\n2026/04/20 08:08:44 exit status 1\nexit status 1\n```\n\n### Database schema\n\n```sql\n\n```\n\n### SQL queries\n\n```sql\n\n```\n\n### Configuration\n\n```yaml\n\n```\n\n### Playground URL\n\n_No response_\n\n### What operating system are you using?\n\nLinux\n\n### What database engines are you using?\n\nPostgreSQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/Resteklicken","@type":"Person","name":"Resteklicken"},"datePublished":"2026-04-20T08:11:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/4397/sqlc/issues/4397"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0008f84e-d143-cd85-b3e5-7cdaf365b98c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA6E:10E65B:4076CE6:59A8464:6A510404 |
| html-safe-nonce | b6eed09d695546cae79a0c92f366322588ff4493143dc1035511bf74446ba5df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTZFOjEwRTY1Qjo0MDc2Q0U2OjU5QTg0NjQ6NkE1MTA0MDQiLCJ2aXNpdG9yX2lkIjoiNTI2NTAwNDUwNzkwMTc4OTE4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fced685d4cd07c4763cd308b2d42ea648cb3ff42f3259bcc9495ac288d7cf04b |
| hovercard-subject-tag | issue:4294125294 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/4397/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6380e9d71ce14cbcdda3407f26b480e2453491b58b647976078ad8e8dbfc94db/sqlc-dev/sqlc/issues/4397 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6380e9d71ce14cbcdda3407f26b480e2453491b58b647976078ad8e8dbfc94db/sqlc-dev/sqlc/issues/4397 |
| og:image:alt | Version 1.31.0 What happened? I suddenly get an error from the go toolchain when it tries to download / run sqlc (see below). Relevant log output go run github.com/sqlc-dev/sqlc/cmd/sqlc@latest vet... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Resteklicken |
| hostname | github.com |
| expected-hostname | github.com |
| None | 38906a4da4e3e9fd88dfeacee232f5932c0c5f7495de3b4efc53ddfac7173d12 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 90441ea9b98e7491aa6ebcd135fccce4e2396f48 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width