Skip to content

Commit

Permalink
Remove submodule. Instead add substrait as module
Browse files Browse the repository at this point in the history
  • Loading branch information
anshuldata committed Sep 26, 2024
1 parent 6c72c89 commit ad8c96e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
Expand All @@ -33,7 +30,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Install go
uses: actions/setup-go@v3
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
with:
fetch-depth: 0
- name: Run go-semantic-release
env:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 4 additions & 6 deletions extensions/extension_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
package extensions

import (
"embed"
"fmt"
"io"
"io/fs"
"path"
"sort"

substrait "github.com/anshuldata/TestGoMod"
"github.com/creasty/defaults"
"github.com/goccy/go-yaml"
substraitgo "github.com/substrait-io/substrait-go"
Expand All @@ -29,17 +29,15 @@ const SubstraitDefaultURIPrefix = "https://github.com/substrait-io/substrait/blo
// 4. unknown.yaml
var DefaultCollection Collection

//go:embed substrait/extensions/*
var definitions embed.FS

func init() {
entries, err := definitions.ReadDir("substrait/extensions")
substraitFS := substrait.GetSubstraitFS()
entries, err := substraitFS.ReadDir("extensions")
if err != nil {
return
}

for _, ent := range entries {
f, err := definitions.Open(path.Join("substrait/extensions/", ent.Name()))
f, err := substraitFS.Open(path.Join("extensions/", ent.Name()))
if err != nil {
panic(err)
}
Expand Down
1 change: 0 additions & 1 deletion extensions/substrait
Submodule substrait deleted from 1f3354
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ go 1.22

require (
github.com/alecthomas/participle/v2 v2.0.0
github.com/anshuldata/TestGoMod v0.59.0
github.com/cockroachdb/apd/v3 v3.2.1
github.com/creasty/defaults v1.8.0
github.com/goccy/go-yaml v1.9.8
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5Jzep
github.com/alecthomas/participle/v2 v2.0.0/go.mod h1:rAKZdJldHu8084ojcWevWAL8KmEU+AT+Olodb+WoN2Y=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/anshuldata/TestGoMod v0.59.0 h1:xvv6G4urUzmN0eLeoN9zVA9bjwFl9P4eFe0Zxv7vRQY=
github.com/anshuldata/TestGoMod v0.59.0/go.mod h1:MngqEEJGWKEnobnYYHk0zjL/FYMOHLLbA7RzD2hOUbQ=
github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg=
github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down

0 comments on commit ad8c96e

Please sign in to comment.