feat(linker): add hoisting limits#809
Conversation
Greptile SummaryThis PR adds pnpm-compatible
Confidence Score: 5/5Safe to merge; the new placement logic is well-tested and the prior from_graph correctness gap has been addressed. The placement algorithm changes are covered by four unit tests that exercise each code path. The from_graph rebuild fix correctly threads the resolved setting through. The only observation is a minor hash-formatting inconsistency in state.rs that does not affect correctness or stability. No files require special attention. Important Files Changed
Reviews (6): Last reviewed commit: "docs(settings): regenerate hoisting limi..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 790d2d8. Configure here.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThis PR introduces hoisting limits configuration for ChangesHoisting Limits Configuration
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |

Summary
Tests
This PR was generated by Codex.
Note
Medium Risk
Changes hoisted
node_moduleslayout and install-state hashing; misconfiguration could alter resolution paths for tools expecting maximum hoisting, though isolated installs are unaffected.Overview
Adds pnpm-compatible
hoistingLimitsfornodeLinker=hoisted: new setting surface (.npmrc, env, workspace YAML,settings.toml, docs) and aHoistingLimitsknob on the linker.When set to
dependencies, the hoisted placement planner caps how far transitives can be promoted—they stay under the direct dependency that introduced them, while still reusing an already-visible matching install and respecting same-name version blockers.none/workspaceskeep prior “hoist as far as possible” behavior (workspaces is documented as equivalent to none for aube’s per-importer planning).Install and rebuild pass the resolved limit into hoisted linking and
HoistedPlacements::from_graph; install-state hashing includes the value so tree layout invalidates when it changes. Isolated linking ignores the setting.Reviewed by Cursor Bugbot for commit a279120. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
hoistingLimitsconfiguration setting to control dependency hoisting behavior. Supports three modes: "none", "workspaces", and "dependencies" (default: "none")..npmrc, and workspace configuration files.Documentation
hoistingLimitssetting.