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

[Feature Request] log more info while lifecycles not found #2604

Closed
kuitos opened this issue Aug 18, 2023 · 6 comments
Closed

[Feature Request] log more info while lifecycles not found #2604

kuitos opened this issue Aug 18, 2023 · 6 comments
Assignees
Milestone

Comments

@kuitos
Copy link
Member

kuitos commented Aug 18, 2023

Background

Need more info for debug

Proposal

Like which lifecycle missed and which variable is searching

Additional context

Add any other context or screenshots about the feature request here.

@kuitos kuitos self-assigned this Aug 18, 2023
@kuitos kuitos added this to the 3.0 milestone Sep 18, 2023
@wanghangit
Copy link
Contributor

wanghangit commented Dec 11, 2023

有些疑问想提前达成共识,好方便进入开发

lifecycle相关

  1. 我记得single-spa针对每一个生命周期都是有类型校验的,这样只需要保证qiankun内部的正确性。我看源码中已经有子应用生命周期的校验了,这里要做的是输出具体生命周期的类型错误吗

其他log

  1. 我看源码很多都是有默认实现的,一个是review看目前项目中哪些方法没有默认实现可能会导致执行错误
  2. 加载子应用,依赖运行时生成的代码在执行时可能导致的问题

通用问题

  1. 打印log用什么方式,需要提供统一的log方法来处理吗
  2. 只有在development环境需要吗,还是根据不同的场景来处理

@kuitos
Copy link
Member Author

kuitos commented Dec 11, 2023

比如失败时,需要输出一下当前找到了哪个变量,这样就能知道是变量本身导出有问题还是找错了变量

@kuitos
Copy link
Member Author

kuitos commented Dec 11, 2023

log 现在有一个简单的统一封装

@wanghangit
Copy link
Contributor

wanghangit commented Dec 11, 2023

比如失败时,需要输出一下当前找到了哪个变量,这样就能知道是变量本身导出有问题还是找错了变量

这里我有些没明白,在找变量的时候都是通过属性(固定或动态的key)访问的,如果没找到就是导出本身有问题。

  • 还是说其实想要的是一段帮助信息都提供给用户,让用户自己去判断比如:searching key is xxx but found undefined
  • 可能更详细的把在哪个方法中调用的也打印出来,并给出修复建议

是我理解这样吗?
提了一个初版的pr #2841 辛苦有时间看看是否满足整体的设计

@kuitos
Copy link
Member Author

kuitos commented Dec 13, 2023

当前找的是哪个变量,然后这个变量上缺乏哪个导出,这些信息

@wanghangit
Copy link
Contributor

当前找的是哪个变量,然后这个变量上缺乏哪个导出,这些信息

好的,那和我理解的差不多,就是输出格式上看看是否有更好的建议

@kuitos kuitos closed this as completed Jan 3, 2024
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

No branches or pull requests

2 participants