fix: resolve typecheck/build ordering in CI#42
Merged
Conversation
Typecheck ran before build in the CI pipeline, so cross-package .d.ts files (e.g. @openlinkos/channel → dist/index.d.ts) did not exist yet, causing 'Cannot find module' TypeScript errors. Fix (Method A): merge typecheck into the build job, running 'pnpm typecheck' immediately after 'pnpm build'. The dependency chain is now: scope → build (build + typecheck) → test The standalone 'typecheck' job is removed. Type errors are still caught as a blocking gate before tests run. Closes #41
There was a problem hiding this comment.
🤖 AI Code Review
Automated review for PR #42 — informational only, does not block merge.
Checklist
| Item | Notes | |
|---|---|---|
| ✅ | Type Safety | No issues detected |
| ✅ | Error Handling | No issues detected |
| ✅ | Test Coverage | No issues detected |
| ✅ | API Consistency | No public API changes |
| ✅ | Breaking Changes | No breaking changes detected |
Stats
- 📁 Files changed: 1 (0 TypeScript)
- ➕ Lines added: 10
- 🧪 Test files updated: 0
All checks passed — looks good! 🎉
Powered by openlinkos/agent · AI PR Review workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41
问题
CI 重构(#36)中 typecheck job 在 build 之前运行,导致跨包的
.d.ts文件(如@openlinkos/channel → dist/index.d.ts)尚不存在,tsc 报Cannot find module错误。根本原因:各包
package.json的types字段指向dist/index.d.ts,而dist/只有build后才存在。修复方案
方案 A:合并 typecheck 进 build job
typecheckjobbuildjob 中先执行pnpm build(生成所有.d.ts),再执行pnpm typecheck新的 CI 依赖链:
权衡
.github/workflows/ci.yml)