mirror of
https://github.com/hanzoai/graph.git
synced 2026-10-30 18:35:37 +00:00
The README states the shape a caller actually gets: 18 packages, 99 source files, 410 passing tests, keys and posting lists in zapdb opened in managed mode with the caller supplying every timestamp. It also states the limit plainly rather than leaving it to be discovered. DQL parses to a syntax tree and stops — no package imports the parser, and the executor that walked that tree belonged to the cluster code. A caller reads by key or by index token and composes UID lists with `algo`; it does not traverse, filter or bind variables. An engine that advertises a query language it cannot execute costs the reader an afternoon. The proto Makefile drops the badger include path along with the import it served.
67 lines
1.6 KiB
Makefile
67 lines
1.6 KiB
Makefile
#
|
|
# SPDX-FileCopyrightText: © 2017-2026 Istari Digital, Inc.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
DGO_PB_VERSION = 250
|
|
|
|
DGO_PATH := github.com/dgraph-io/dgo/v${DGO_PB_VERSION}
|
|
TMPDIR := $(shell mktemp -d)
|
|
PROTO_PATH := ${TMPDIR}/src:.
|
|
PROTO_PATH := ${PROTO_PATH}:${TMPDIR}/src/${DGO_PATH}/protos
|
|
|
|
.PHONY: help
|
|
help:
|
|
@echo Use \"make regenerate\" to proceed.
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@mkdir -p pb && rm -f pb/pb.pb.go
|
|
|
|
.PHONY: tidy-deps
|
|
tidy-deps:
|
|
@go mod tidy -v
|
|
|
|
.PHONY: check
|
|
check:
|
|
@./depcheck.sh && \
|
|
(echo "Installing proto libraries to versions in go.mod." ; \
|
|
go install google.golang.org/protobuf/cmd/[email protected])
|
|
|
|
.PHONY: copy-protos
|
|
copy-protos:
|
|
@mkdir -p ${TMPDIR}/src/${DGO_PATH}/protos
|
|
@cp $(shell go list -m -f "{{.Dir}}" ${DGO_PATH})/protos/api.proto \
|
|
${TMPDIR}/src/${DGO_PATH}/protos/api.proto
|
|
|
|
.PHONY: patch-pb
|
|
patch-pb:
|
|
./patch_pb.sh
|
|
|
|
ifneq ($(UNAME_S),Linux)
|
|
.PHONY: regenerate
|
|
regenerate:
|
|
@echo "Running in Docker..."
|
|
@docker run --rm -v $(shell pwd)/..:/go/src/github.com/hanzoai/graph \
|
|
-w /go/src/github.com/hanzoai/graph/protos \
|
|
golang:1.25.0 \
|
|
/bin/bash -c "apt-get update && apt-get install -y protobuf-compiler && make regenerate"
|
|
else
|
|
.PHONY: regenerate
|
|
regenerate: tidy-deps copy-protos check clean
|
|
echo ${DGO_PATH}
|
|
@protoc \
|
|
--proto_path=/usr/local/include \
|
|
--proto_path=/usr/include \
|
|
--proto_path=/opt/homebrew/include/google/protobuf \
|
|
--proto_path=${PROTO_PATH} \
|
|
--go_out=pb \
|
|
--go_opt=paths=source_relative \
|
|
pb.proto
|
|
@$(MAKE) patch-pb
|
|
@rm -rf ${TMPDIR}
|
|
@echo Done.
|
|
endif
|