Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit b5ecd30

Browse files
fix: improve Go version handling (#660)
1 parent 6f1cf0b commit b5ecd30

File tree

19 files changed

+25
-19
lines changed

19 files changed

+25
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- chore: lint example test [#656](https://github.com/hypermodeinc/modus/pull/656)
66
- fix: unused imports should not be included in metadata [#657](https://github.com/hypermodeinc/modus/pull/657)
7+
- fix: improve Go version handling [#660](https://github.com/hypermodeinc/modus/pull/660)
78

89
## 2024-12-13 - Runtime 0.15.0
910

cli/src/commands/new/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,19 @@ export default class NewCommand extends BaseCommand {
321321
// Apply SDK-specific modifications
322322
const execOpts = { env: process.env, cwd: dir, shell: true };
323323
switch (sdk) {
324-
case SDK.AssemblyScript:
324+
case SDK.AssemblyScript: {
325325
await execFile("npm", ["pkg", "set", `name=${name}`], execOpts);
326326
await execFile("npm", ["install"], execOpts);
327327
break;
328-
case SDK.Go:
328+
}
329+
case SDK.Go: {
330+
const goVersion = await getGoVersion();
331+
await execFile("go", ["mod", "edit", "-go", goVersion!], execOpts);
329332
await execFile("go", ["mod", "edit", "-module", name], execOpts);
330333
await execFile("go", ["mod", "download"], execOpts);
334+
await execFile("go", ["mod", "tidy"], execOpts);
331335
break;
336+
}
332337
}
333338

334339
if (createGitRepo) {

cli/src/custom/globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import process from "node:process";
1414
export const ModusHomeDir = process.env.MODUS_HOME || path.join(os.homedir(), ".modus");
1515

1616
export const MinNodeVersion = "22.0.0";
17-
export const MinGoVersion = "1.23.0";
17+
export const MinGoVersion = "1.23.1";
1818
export const MinTinyGoVersion = "0.33.0";
1919

2020
export const GitHubOwner = "hypermodeinc";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module testdata
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0

sdk/go/examples/anthropic-functions/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module anthropic-functions-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0
66

sdk/go/examples/auth/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module auth-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module classification-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0

sdk/go/examples/collections/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module collection-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0

sdk/go/examples/dgraph/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module dgraph-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0

sdk/go/examples/embedding/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module embedding-example
22

3-
go 1.23.0
3+
go 1.23.4
44

55
require github.com/hypermodeinc/modus/sdk/go v0.15.0
66

0 commit comments

Comments
 (0)