-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
全面支持 aa #323
Comments
还允许这样引入么? |
现在没有地方禁止这个用法。这个好解决,我们可以统一在 app.use 处封装。不过 router 比较麻烦一点,还要考虑后续我们是否要跟进 koa-router。 |
集成到 egg 中的插件也需要支持 aa,multipart 比较难搞,除非我们用 co 包一层。 |
现在 egg 不能直接用 koa 的插件吧, 都要包一层, 是不是 1.0 版本的中间件都直接支持 ctx 的方式就好了? |
还是向下兼容吧,在 loader 改也可以,app.use 感觉不应该被使用,用了也搞不清楚顺序。
TZ | 天猪 <notifications@github.com>于2017年2月7日 周二12:02写道:
… 现在 egg 不能直接用 koa 的插件吧, 都要包一层, 是不是 1.0 版本的中间件都直接支持 ctx 的方式就好了?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#323 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAWA1btfL5v8SiQP1jGRYkSumJQzIckgks5rZ-y6gaJpZM4L4_V_>
.
|
没有地方推荐用户直接用 app.use,但是现在确实是可以被使用的。 现在准备支持 |
@dead-horse 现在对 aa 的支持是在 koa 里实现的还是 egg 里? |
感觉co.wrap包一层也不是很麻烦吧 |
在 egg 里,底层还是用 generator function 这套,将 aa 包成 generator function。等到后面我们大规模往 aa 迁移了,再考虑底层用 aa。 |
router 我们已经 wrap 过了,现在就支持了吧? |
感觉就 multipart 麻烦点 |
我来写这个,改 hacknews 的时候发现有问题再来提 #276 |
multipart 是指用 co-busboy 么 |
multipart 用 co 包一下即可。 |
multipart 本来就不需要考虑性能问题 |
egg-core 我先将标题里面发现的这些点先补上。 |
现在底层还是基于 generator 来支持 aa 的,所以 aa 的性能会受一点影响。 @popomore 写文档的时候还是要说明一下,现阶段还是推荐用 generator? |
@popomore 现在插件中的 middleware 是不是都改为新的方式 |
generator 现在性能会好点,不改吧
TZ | 天猪 <notifications@github.com>于2017年2月8日 周三09:32写道:
… @popomore <https://github.com/popomore> 现在插件中的 middleware 是不是都改为新的方式
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#323 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAWA1UIkitjYsKt5p6UzOp-0IFIEbcqIks5raRssgaJpZM4L4_V_>
.
|
@atian25 现在 7.x 支持 async await 了,所以 egg 也开始基于 generator 开启对 aa 的支持,等到 LTS 版本支持 aa 的时候,我们再切换到 koa@2,然后迁移代码。不然现在�写了就没法在 6.x 用了。 |
node下个版本 7.6 应该会默认支持aa了,koa2正式版那就应该很快了。 |
@arden https://eggjs.org/zh-cn/intro/egg-and-koa.html#升级计划 这里有讲到. koa 的核心开发者中好几个就在 egg 这边, 所以不用担心. |
@arden 跑个题,7.6默认支持aa这个消息的来源是? |
@Rwing nodejs/node#11185 node 7.6 会将 v8 升级到 5.5,届时就默认支持 aa 了,但是要等到 v8 5.6 才会对它进行性能优化。 |
@dead-horse good job!我以为大版本号才会对V8进行升级,竟然7.6就升级了,多谢 |
|
@dead-horse 这个不算 breaking change,所以还是发了 7.x |
恩,land 到 7.x 上的时候是做了向前兼容的。 nodejs/node#11029 |
这个应该做完了, close 了 |
koa 2.0 已经正式发布了。 |
controller、service 等都已经支持 async function 了,现在 egg 核心中剩下各处中间件的改造,插件现阶段不适合进行改造。
app.use(mw)
引入的中间件。The text was updated successfully, but these errors were encountered: