Skip to content

chore: stop building packages during install#180

Open
lilienblum wants to merge 3 commits into
mainfrom
lilienblum/remove-install-build-hooks
Open

chore: stop building packages during install#180
lilienblum wants to merge 3 commits into
mainfrom
lilienblum/remove-install-build-hooks

Conversation

@lilienblum

Copy link
Copy Markdown
Contributor

Summary

  • remove the prepare build hook from the core, commands, bindings, and SDK packages
  • keep package compilation behind the existing explicit build commands

Why

A workspace pnpm install currently compiles all four packages as a lifecycle side effect. Bootstrap only needs dependencies installed, so that work is unnecessary and makes setup appear stuck.

The stable and dev npm release workflows already run pnpm build before publishing or packing. A prepack replacement would keep compilation implicit and duplicate those release build steps.

Validation

  • fresh and repeated pnpm install --frozen-lockfile complete without invoking the package builds
  • explicit builds succeed for core, commands, bindings, and SDK
  • package-layout fixture passes all 28 packed-artifact and consumer checks
  • Biome passes for the changed manifests

@lilienblum lilienblum added the refactor Behavior-preserving code reorganization label Jul 23, 2026
@lilienblum
lilienblum requested a review from alongubkin July 23, 2026 06:55
@lilienblum
lilienblum marked this pull request as ready for review July 23, 2026 06:56
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR stops four TypeScript workspace packages from compiling as an installation lifecycle side effect.

  • Removes each package's prepare script.
  • Retains the existing explicit build scripts.
  • Leaves release and package-layout workflows responsible for building before packing.

Confidence Score: 3/5

The PR should not merge until the root test workflow explicitly builds its workspace dependencies or otherwise resolves package sources in clean checkouts.

Removing the prepare hooks leaves dist absent after installation, while turbo test does not schedule builds and affected tests resolve core through its generated-only package export.

packages/core/package.json, packages/commands/package.json, packages/bindings/package.json, and the root Turbo test orchestration

Important Files Changed

Filename Overview
packages/core/package.json Removes the build lifecycle hook even though core's generated dist export is consumed by tests not ordered behind a build.
packages/commands/package.json Removes its install-time build; its tests also transitively require core's generated package output.
packages/bindings/package.json Removes its install-time build; bindings source resolves core through the generated package export.
packages/sdk/package.json Removes the redundant lifecycle build while retaining explicit compilation commands.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/core/package.json:13
**Root tests miss required builds**

When a developer runs `pnpm install` followed by the root `pnpm test` command in a clean checkout, `turbo test` does not build workspace packages first, so imports of `@alienplatform/core` resolve to the absent `dist/index.js` and Vitest fails module resolution.

Reviews (1): Last reviewed commit: "chore: stop building packages during ins..." | Re-trigger Greptile

@@ -11,7 +11,6 @@
},
"scripts": {
"build": "tsdown",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Root tests miss required builds

When a developer runs pnpm install followed by the root pnpm test command in a clean checkout, turbo test does not build workspace packages first, so imports of @alienplatform/core resolve to the absent dist/index.js and Vitest fails module resolution.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/package.json
Line: 13

Comment:
**Root tests miss required builds**

When a developer runs `pnpm install` followed by the root `pnpm test` command in a clean checkout, `turbo test` does not build workspace packages first, so imports of `@alienplatform/core` resolve to the absent `dist/index.js` and Vitest fails module resolution.

**Knowledge Base Used:**
- [SDK and bindings: how apps reach storage, KV, queue, and vault](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/sdk-bindings.md)
- [Remote Commands Protocol](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/remote-commands.md)

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Behavior-preserving code reorganization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant