Autodesk / Autodesk/AutomaticComponentToolkit
Component Injection should not create global variables
- 主要语言
- Go
- 星标
- 53
- 派生
- 26
- PR 合并指标
- 30 天内没有已合并 PR
描述
Currently, component injection on the implementation side introduces static global variables - which are not a good idea in my opinion to introduce.
My suggestion would be, that we refactor component injection on the global level, and rather make it a feature of specific objects themselves. All classes that are created as return or out value of a method of an object would automatically "inherit" the injected component.
This would make a pattern very straight-forward, where people create a global context (like an "App" object) - and then use this as starting point for all further operations.
贡献指南
调研方向
首先跟踪实现侧的组件注入,以及方法返回值和 out 值的对象创建路径。定义注入组件应如何从上下文对象继承,然后验证重构移除了静态全局变量,同时保留对返回对象的注入。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go
- 领域
- tooling
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100