Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: aspect bind missing ctx #694

Merged
merged 2 commits into from
Oct 31, 2020
Merged

fix: aspect bind missing ctx #694

merged 2 commits into from
Oct 31, 2020

Conversation

czy88840616
Copy link
Member

@czy88840616 czy88840616 commented Oct 29, 2020

fixed: #683

尝试了多种方式,均无法解决描述符的多次加载问题。现阶段处理为:

  • 1、拦截器在一个进程,多个 container 中只加载一次(这样才不会重复加载)
  • 2、随之而来的问题就是拦截器中注入的 app/logger 等,引用会固定在第一个容器上,如果有注入的情况,会出现上下文错乱的问题(文档指引,不允许使用)

在 EggJS 场景下影响不大,这样处理可以接受。

@gitpod-io
Copy link

gitpod-io bot commented Oct 29, 2020

@codecov-io
Copy link

codecov-io commented Oct 31, 2020

Codecov Report

Merging #694 into 2.x will increase coverage by 0.09%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x     #694      +/-   ##
==========================================
+ Coverage   87.35%   87.44%   +0.09%     
==========================================
  Files          96       96              
  Lines        4120     4126       +6     
  Branches      687      688       +1     
==========================================
+ Hits         3599     3608       +9     
+ Misses        508      505       -3     
  Partials       13       13              
Impacted Files Coverage Δ
packages/core/src/context/midwayContainer.ts 95.94% <85.71%> (+0.91%) ⬆️
packages/core/src/baseFramework.ts 75.42% <100.00%> (+0.42%) ⬆️
packages/mock/src/utils.ts 75.75% <100.00%> (+0.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 625629d...7336f01. Read the comment docs.

@czy88840616 czy88840616 merged commit 871ea80 into 2.x Oct 31, 2020
@czy88840616 czy88840616 deleted the fix_aspect_bind branch October 31, 2020 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants