Skip to content

Conversation

marcj
Copy link
Owner

@marcj marcj commented Oct 7, 2025

Removed RpcInjectorContext due to highly misleading behaviour. It's now possible to inject InjectorContext in the different scopes with correct expectations (to get the scoped injector context).

Summary of changes

Relinquishment of Rights

Please mark following checkbox to confirm that you relinquish all rights of your changes:

  • I waive and relinquish all rights regarding this changes (including code, text, and images) to Deepkit UG (limited), Germany. This changes (including code, text, and images) are under MIT license without name attribution, copyright notice, and permission notice requirement.

@marcj marcj requested a review from Copilot October 7, 2025 22:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes incorrect InjectorContext scope behavior in HTTP and RPC contexts by removing the misleading RpcInjectorContext class and ensuring proper scoped injection of InjectorContext across different contexts.

  • Removes the RpcInjectorContext class that was causing misleading behavior
  • Configures proper scoped InjectorContext providers for both RPC and HTTP contexts
  • Updates the injector system to correctly set and retrieve scoped injector contexts
  • Adds comprehensive tests to verify correct injector context scoping behavior

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/rpc/src/server/kernel.ts Adds InjectorContext provider to RPC scope and sets injector context properly
packages/http/src/module.ts Adds scoped InjectorContext provider to HTTP module configuration
packages/http/src/http.ts Updates setter call to use string scope name instead of scope object
packages/injector/src/injector.ts Refactors setter methods to accept scope names and improves scope handling
packages/framework/src/*.ts Removes RpcInjectorContext references and updates to use InjectorContext
test files Updates tests to use InjectorContext instead of RpcInjectorContext

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Removed RpcInjectorContext due to highly misleading behaviour. It's now possible to inject InjectorContext in the different scopes with correct expectations (to get the scoped injector context).
@marcj marcj requested a review from Copilot October 7, 2025 22:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@marcj marcj requested a review from Ventrae October 7, 2025 22:33
@marcj marcj merged commit a56b7dd into master Oct 7, 2025
15 of 16 checks passed
@marcj marcj deleted the fix/injector branch October 7, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants