Skip to content
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
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
Expand Down Expand Up @@ -56,6 +57,15 @@ jobs:
with:
go-version-file: go.mod

- name: Show build context
shell: bash
run: |
set -euo pipefail
echo "ref=${GITHUB_REF_NAME}"
echo "runner=$(uname -a)"
go version
go env GOOS GOARCH CGO_ENABLED GOPATH GOMODCACHE GOCACHE

- name: Build archive
shell: bash
run: |
Expand All @@ -69,7 +79,7 @@ jobs:
fi
archive_base="${binary}_${version}_${{ matrix.goos }}_${{ matrix.goarch }}"
mkdir -p "${dist}/${archive_base}"
GOOS="${{ matrix.goos }}" GOARCH="${{ matrix.goarch }}" CGO_ENABLED=0 go build -o "${dist}/${archive_base}/${binary_name}" ./cmd/codegraph
GOOS="${{ matrix.goos }}" GOARCH="${{ matrix.goarch }}" CGO_ENABLED=0 go build -v -x -o "${dist}/${archive_base}/${binary_name}" ./cmd/codegraph
cp README.md "${dist}/${archive_base}/README.md"
cp LICENSE "${dist}/${archive_base}/LICENSE"
if [ "${{ matrix.archive_ext }}" = "zip" ]; then
Expand Down
18 changes: 0 additions & 18 deletions internal/cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import (
"github.com/isink17/codegraph/internal/indexer"
"github.com/isink17/codegraph/internal/logging"
"github.com/isink17/codegraph/internal/mcp"
"github.com/isink17/codegraph/internal/parser"
tsparser "github.com/isink17/codegraph/internal/parser/treesitter"
"github.com/isink17/codegraph/internal/platform"
"github.com/isink17/codegraph/internal/query"
"github.com/isink17/codegraph/internal/store"
Expand Down Expand Up @@ -1065,22 +1063,6 @@ func openApp(ctx context.Context, cfg config.Config, repoRoot string) (*App, gra
return app, graphRepo{ID: repo.ID, RootPath: repo.RootPath}, repo.ID, nil
}

func newDefaultRegistry() *parser.Registry {
return parser.NewRegistry(
tsparser.NewGo(),
tsparser.NewPython(),
tsparser.NewJava(),
tsparser.NewKotlin(),
tsparser.NewCSharp(),
tsparser.NewTypeScript(),
tsparser.NewRust(),
tsparser.NewRuby(),
tsparser.NewSwift(),
tsparser.NewPHP(),
tsparser.NewCpp(),
)
}

func newEmbedder(cfg config.EmbeddingConfig) embedding.Embedder {
if !cfg.Enabled {
return nil
Expand Down
24 changes: 24 additions & 0 deletions internal/cli/registry_cgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//go:build cgo

package cli

import (
"github.com/isink17/codegraph/internal/parser"
tsparser "github.com/isink17/codegraph/internal/parser/treesitter"
)

func newDefaultRegistry() *parser.Registry {
return parser.NewRegistry(
tsparser.NewGo(),
tsparser.NewPython(),
tsparser.NewJava(),
tsparser.NewKotlin(),
tsparser.NewCSharp(),
tsparser.NewTypeScript(),
tsparser.NewRust(),
tsparser.NewRuby(),
tsparser.NewSwift(),
tsparser.NewPHP(),
tsparser.NewCpp(),
)
}
Comment thread
isink17 marked this conversation as resolved.
26 changes: 26 additions & 0 deletions internal/cli/registry_nocgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//go:build !cgo

package cli

import (
"github.com/isink17/codegraph/internal/parser"
goparser "github.com/isink17/codegraph/internal/parser/golang"
heuristicparser "github.com/isink17/codegraph/internal/parser/heuristic"
pyparser "github.com/isink17/codegraph/internal/parser/python"
)

func newDefaultRegistry() *parser.Registry {
return parser.NewRegistry(
goparser.New(),
pyparser.New(),
heuristicparser.NewJava(),
heuristicparser.NewKotlin(),
heuristicparser.NewCSharp(),
heuristicparser.NewTypeScriptJavaScript(),
heuristicparser.NewRust(),
heuristicparser.NewRuby(),
heuristicparser.NewSwift(),
heuristicparser.NewPHP(),
heuristicparser.NewCAndCpp(),
)
}
2 changes: 2 additions & 0 deletions internal/parser/treesitter/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/cpp_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/csharp_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/go_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/java_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/kotlin_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/php_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/python_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/ruby_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/rust_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/swift_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
2 changes: 2 additions & 0 deletions internal/parser/treesitter/typescript_adapter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package treesitter

import (
Expand Down
Loading