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

跑了example工程中的例子 没有效果 #6

Closed
Knight-ZXW opened this issue Aug 8, 2019 · 5 comments
Closed

跑了example工程中的例子 没有效果 #6

Knight-ZXW opened this issue Aug 8, 2019 · 5 comments

Comments

@Knight-ZXW
Copy link

[✓] Flutter (Channel master, v1.8.5-pre.77, on Mac OS X 10.14 18A391, locale zh-Hans-CN)
• Flutter version 1.8.5-pre.77 at /Users/hb/development/flutter
• Framework revision 8e5fb8c35d (3 hours ago), 2019-08-07 22:29:24 -0400
• Engine revision f200ee13aa
• Dart version 2.5.0 (build 2.5.0-dev.1.0 f29f41f1a5)

flutter git 目录执行过
git apply --3way path-for-aspectd-package/0001-aspectd.patch
rm bin/cache/flutter_tools.stamp

操作

@kangwang1988
Copy link
Contributor

@Knight-ZXW
如果你确定意境应用了patch,并且删除flutter_tools.stamp,那么Building flutter tool...将会执行重新生成flutter_tools的snapshot。
之后如果没有看到效果,以flutter run为例那么有几个地方可以确认下。
a. example/aop/build/app.dill是否有生成
Screen Shot 2019-08-08 at 5 30 52 PM

b.~/.pub-cache/git中的sdk-xxx(dart源代码)和aspectd-xxx的源代码是否都存在,不为空,并且aspectd-xx/snapshot下的aspectd.dart.snapshot是否已经成功生成
Screen Shot 2019-08-08 at 5 33 39 PM

再一个,麻烦贴一下flutter run --release --verbose的全部日志哈。

@Knight-ZXW
Copy link
Author

屏幕快照 2019-08-08 下午8 43 28

git clone dart sdk 好慢,经常出现 error: RPC failed 而中断 .

我看了源码,有个疑问,这里为什么需要单独 从git下载dart依赖,不能直接使用 用户本地flutter路径中的dart库吗

@kangwang1988
Copy link
Contributor

@Knight-ZXW
aspectd使用的transformer需要dart-sdk本身提供的几个dart库,这些库以源码形式存在,并不在用户本身flutter的dart库中。但他们是相关的,你的flutter对应的dartsdk的源代码就是这里需要git获取的内容。

@Knight-ZXW
Copy link
Author

@kangwang1988
aspectd使用的transformer需要dart-sdk本身提供的几个dart库,这些库以源码形式存在,并不在用户本身flutter的dart库中。但他们是相关的,你的flutter对应的dartsdk的源代码就是这里需要git获取的内容。

通过打印日志,发现不生效的原因是 访问github太慢了导致超时,
1.是连接 http://raw.githubusercontent.com/flutter/engine/xxxx/DEPS 有时候会超时

2.是 git clone dart-sdk 会超时,dart-sdk太大了,可能出现 error: RPC failed 而中断,clone不下来。

后来我通过将 dart-sdk clone到 gitee,从gitee上下载 暂时解决了该问题。

@maheshj01
Copy link

can you please provide some detailed example on How to do logging and exception handling it can be very useful if you provide some detailed runnning example

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

3 participants