Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Go Modules #450

Merged
merged 11 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-sdk-go-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
uses: actions/checkout@v4
- name: Find tools
id: get-tools-dirs
run: echo "dirs=$(find ./sdk/go/tools -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
run: echo "dirs=$(find ./sdk/go/tools -mindepth 1 -maxdepth 1 -type d | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
- name: Find examples
id: get-examples-dirs
run: echo "dirs=$(find ./sdk/go/examples -name 'go.mod' -exec dirname {} \; | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
run: echo "dirs=$(find ./sdk/go/examples -mindepth 1 -maxdepth 1 -type d | jq -Rsc 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}

sdk-go-build-tools:
needs: get-dirs
Expand All @@ -40,8 +40,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
cache-dependency-path: "${{ matrix.dir }}/go.sum"
go-version-file: "${{ matrix.dir }}/go.mod"
cache-dependency-path: "./sdk/go/go.sum"
go-version-file: "./sdk/go/go.mod"
- name: Generate Code
run: go generate ./...
- name: Build Program
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ In previous releases, the name "Hypermode" was used for all three._
- Target Node 22 [#446](https://github.com/hypermodeinc/modus/pull/446)
- Fix object/map field stitching [#447](https://github.com/hypermodeinc/modus/pull/447)
- Use cli component instead of direct node execution modus-sdk-as [#448](https://github.com/hypermodeinc/modus/pull/448)
- Cleanup Go Modules [#450](https://github.com/hypermodeinc/modus/pull/450)

## 2024-10-02 - Version 0.12.7

Expand Down
17 changes: 17 additions & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Modus Shared Libraries

This directory contains shared libraries that are used by various Modus components, or externally.

Each subdirectory contains a separate Go module that is versioned independently from the rest of the repository,
using a module path and tag scheme that matches the folder path.

For example, updates to the `manifest` subdirectory are tagged as `lib/manifest/vX.Y.Z`, and are installed with

```sh
go get -u github.com/hypermodeinc/modus/lib/manifest
```

## Usage outside Modus

The shared libraries can be used for any purpose, subject to the Modus [LICENSE](../LICENSE).
Primarily they are used by the Modus runtime, and hosting infrastructure such as [Hypermode](https://hypermode.com).
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion go.mod → lib/manifest/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/hypermodeinc/modus
module github.com/hypermodeinc/modus/lib/manifest

go 1.23.0

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"reflect"
"testing"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
)

//go:embed valid_hypermode.json
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmextractor/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/hypermodeinc/modus/lib/wasmextractor

go 1.23.0
Empty file added lib/wasmextractor/go.sum
Empty file.
2 changes: 1 addition & 1 deletion runtime/collections/vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"slices"
"time"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/collections/in_mem"
"github.com/hypermodeinc/modus/runtime/collections/in_mem/sequential"
"github.com/hypermodeinc/modus/runtime/collections/index"
Expand Down
2 changes: 1 addition & 1 deletion runtime/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"sync"
"time"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/logger"
"github.com/hypermodeinc/modus/runtime/metrics"
"github.com/hypermodeinc/modus/runtime/plugins"
Expand Down
2 changes: 1 addition & 1 deletion runtime/dgraphclient/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strings"
"sync"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/secrets"

Expand Down
4 changes: 2 additions & 2 deletions runtime/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module github.com/hypermodeinc/modus/runtime

go 1.23.0

require github.com/hypermodeinc/modus v0.0.0
require github.com/hypermodeinc/modus/lib/manifest v0.0.0

replace github.com/hypermodeinc/modus => ../
replace github.com/hypermodeinc/modus/lib/manifest => ../lib/manifest

require (
github.com/OneOfOne/xxhash v1.2.8
Expand Down
2 changes: 1 addition & 1 deletion runtime/graphql/schemagen/schemagen_as_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"testing"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/languages"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/plugins/metadata"
Expand Down
2 changes: 1 addition & 1 deletion runtime/graphql/schemagen/schemagen_go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"testing"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/languages"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/plugins/metadata"
Expand Down
2 changes: 1 addition & 1 deletion runtime/hosts/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
urlpkg "net/url"
"strings"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/secrets"
"github.com/hypermodeinc/modus/runtime/utils"
Expand Down
2 changes: 1 addition & 1 deletion runtime/manifestdata/manifestdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"context"
"sync"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/logger"
"github.com/hypermodeinc/modus/runtime/storage"
"github.com/hypermodeinc/modus/runtime/utils"
Expand Down
2 changes: 1 addition & 1 deletion runtime/models/bedrock.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"context"
"fmt"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
hyp_aws "github.com/hypermodeinc/modus/runtime/aws"
"github.com/hypermodeinc/modus/runtime/db"
"github.com/hypermodeinc/modus/runtime/utils"
Expand Down
2 changes: 1 addition & 1 deletion runtime/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"net/http"
"strings"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/config"
"github.com/hypermodeinc/modus/runtime/db"
"github.com/hypermodeinc/modus/runtime/hosts"
Expand Down
2 changes: 1 addition & 1 deletion runtime/models/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"os"
"testing"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/secrets"

Expand Down
2 changes: 1 addition & 1 deletion runtime/secrets/awssecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"sync"
"time"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/aws"
"github.com/hypermodeinc/modus/runtime/config"
"github.com/hypermodeinc/modus/runtime/logger"
Expand Down
2 changes: 1 addition & 1 deletion runtime/secrets/localsecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"os"
"strings"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
)

type localSecretsProvider struct {
Expand Down
2 changes: 1 addition & 1 deletion runtime/secrets/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"os"
"regexp"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/config"
"github.com/hypermodeinc/modus/runtime/logger"
"github.com/hypermodeinc/modus/runtime/utils"
Expand Down
2 changes: 1 addition & 1 deletion runtime/sqlclient/pooling.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"context"
"fmt"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/secrets"

Expand Down
2 changes: 1 addition & 1 deletion runtime/sqlclient/sqlclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"context"
"fmt"

"github.com/hypermodeinc/modus/pkg/manifest"
"github.com/hypermodeinc/modus/lib/manifest"
"github.com/hypermodeinc/modus/runtime/manifestdata"
"github.com/hypermodeinc/modus/runtime/utils"
)
Expand Down
Loading
Loading