Conversation
Contributor
There was a problem hiding this comment.
The PR introduces a reasonable fix for re-registering compile targets in worker threads, but has two substantive issues: MODULE_NOT_FOUND errors from plugins that legitimately don't have a lib/api path are indistinguishably swallowed alongside real failures, and this plugin itself (@cap-js/ord) doesn't expose a lib/api.js with registerCompileTargets, meaning its own ORD compile target will silently fail to register in the worker thread — the very problem this PR aims to fix.
PR Bot Information
Version: 1.18.5 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback
- LLM:
anthropic--claude-4.6-sonnet - Agent Instructions:
- Event Trigger:
pull_request.opened - Correlation ID:
c188c540-2137-11f1-9082-967e7a767b90
…ns for compiler thread
78bd3f9 to
158f825
Compare
…ins-in-worker-threads
swennemers
reviewed
Mar 17, 2026
| const Logger = require("../logger"); | ||
| const compileMetadata = require("../metaData"); | ||
|
|
||
| // Worker threads skip cds-plugin.js — re-register compile targets |
swennemers
approved these changes
Mar 17, 2026
Contributor
swennemers
left a comment
There was a problem hiding this comment.
approve as quick fix, don't like us reimplementing CAP plugin handling, would request a solution from the CAP core
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.
Fix: Ensure
registerCompileTargetsis Called for All Registered Plugins in Compiler ThreadBug Fix
🐛 Worker threads do not execute
cds-plugin.js, which means compile target registrations performed by CDS plugins are skipped in the compiler thread. This fix ensures that all registered plugins explicitly callregisterCompileTargetswhen the compiler worker thread initializes.Changes
lib/threads/compile.js: Added logic to iterate over all registered CDS plugins at worker thread startup and invokeregisterCompileTargets(if available) on each plugin's API. Failures are caught and logged as warnings to avoid crashing the thread. Also added the missingLoggerimport to support this warning output.📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!
PR Bot Information
Version:
1.18.5| 📖 Documentation | 🚨 Create Incident | 💬 Feedbackissue_comment.editedcdd25eb0-2137-11f1-8149-9804b670fc75anthropic--claude-4.6-sonnet