You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@graphar.apache.org by "ZekiLiu (via GitHub)" <gi...@apache.org> on 2026/07/18 11:11:13 UTC
[PR] chore(go): bootstrap Go SDK module and CI [incubator-graphar]
ZekiLiu opened a new pull request, #937:
URL: https://github.com/apache/incubator-graphar/pull/937
### Reason for this PR
This PR starts the Go SDK work tracked by #828.
The Go SDK needs a standalone module layout and CI/tooling foundation before
the actual GraphAr metadata APIs are added. Keeping this bootstrap change small
also makes the follow-up info implementation easier to review as a stacked PR.
Refs #828.
### What changes are included in this PR?
This PR adds the initial Go SDK scaffold:
- create the `go/graphar` Go module
- add the umbrella `graphar` package documentation
- add Go development targets for formatting, vetting, linting, testing,
coverage, and license checks
- add a GitHub Actions workflow for Go CI when files under `go/**` change
- update license configuration for Go source files
This PR intentionally does not add the `types` or `info` package implementation
yet. Those APIs are planned for the stacked follow-up PR.
### Are these changes tested?
The intended local and CI checks are:
- `cd go/graphar && go mod tidy`
- `cd go/graphar && go test ./...`
- `cd go/graphar && make ci`
- `pre-commit run --files .github/workflows/go.yaml go/README.md go/graphar/.golangci.yml go/graphar/Makefile go/graphar/doc.go go/graphar/go.mod go/graphar/go.sum`
### Are there any user-facing changes?
Yes. This introduces the new Go SDK module directory and its README, but it does
not change any existing GraphAr API behavior.
## Checklist
- [x] I have performed a self-review of my own code.
- [x] I have formatted my own code using `make cpplint` before submitting when changed files are in the `cpp` directory. (Not applicable: this PR does not change files in the `cpp` directory.)
- [x] I have performed `pre-commit run` before commit the changed files.
- [x] I have added tests to prove my changes are effective. (CI/tooling bootstrap is covered by the Go workflow and module checks listed above; implementation tests are added in the stacked follow-up PR.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] chore(go): bootstrap Go SDK module and CI [incubator-graphar]
Posted by "SYaoJun (via GitHub)" <gi...@apache.org>.
SYaoJun merged PR #937:
URL: https://github.com/apache/incubator-graphar/pull/937
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] chore(go): bootstrap Go SDK module and CI [incubator-graphar]
Posted by "SYaoJun (via GitHub)" <gi...@apache.org>.
SYaoJun commented on PR #937:
URL: https://github.com/apache/incubator-graphar/pull/937#issuecomment-5045125146
## Review: PR #937 — chore(go): bootstrap Go SDK module and CI
### 概述
这个 PR 为 GraphAr 项目添加了 Go SDK 的基础设施,包括:Go module、Makefile、golangci-lint 配置、GitHub Actions CI workflow、以及许可证配置。代码质量好,CI 设计合理。
---
### 发现的问题
#### 1. `go/README.md` 中的 Quick example 引用了尚未存在的代码
`go/README.md` Quick example 使用了 `info.LoadGraphInfo` 等方法,但这些包在当前 PR 中并不存在(计划在 stacked follow-up PR 中交付)。新用户 clone 代码后运行这个示例会直接编译失败。
建议:在示例代码前加 `// TODO: available in the next stacked PR` 注释,或将示例包裹在标记块中明确标"coming soon"。
#### 2. `.golangci.yml` 注释版本与 CI 实际版本不一致
`.golangci.yml` 头部注释写的是 `v1.62.x format`,但 `go.yaml` 中 `golangci-lint-action` 实际使用 `v1.64.8`。建议将注释更新为 `v1.64.x` 或移除版本引用。
---
### 建议(非阻塞)
#### 3. `go mod tidy` 步骤的 `git diff` 路径
```yaml
git diff --quiet -- go.mod go.sum
```
由于 `working-directory` 为 `go/graphar`,建议使用完整路径 `git diff --quiet -- go/graphar/go.mod go/graphar/go.sum` 以避免歧义。
---
### 做得好的地方
- **CI 设计**:双 Job(build + lint)架构合理,matrix 测试覆盖 Go 1.23 和 stable,WIP 自动跳过
- **concurrency 控制**:正确使用 `cancel-in-progress`
- **golangci-lint 配置**:linter 选择完备,revive 规则集合理
- **Makefile**:`golangci-lint --version` 处理了 asdf shim 边界情况;coverage floor 在无代码时自动跳过
- **许可证配置**:`DOUBLESLASH_STYLE` mapping 正确,`go.sum` 被正确排除
---
### 结论
这是一个干净规范的脚手架 PR。除 README 中的前向引用外无实质缺陷。**LGTM with minor suggestions**.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [PR] chore(go): bootstrap Go SDK module and CI [incubator-graphar]
Posted by "SYaoJun (via GitHub)" <gi...@apache.org>.
SYaoJun commented on PR #937:
URL: https://github.com/apache/incubator-graphar/pull/937#issuecomment-5045210623
@ZekiLiu Hi, thanks for your contribution! An AI reviewer left some suggestions below — feel free to address them if you find them useful. Overall, LGTM!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org