NativeScript / NativeScript/android
Publish debug symbols for nativescript-optimized.aar, not only for nativescript-regular.aar
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 563
- 派生
- 144
- 平均合并
- 10 小时 46 分钟
- 30 天内合并 PR
- 14
描述
Is your feature request related to a problem? Please describe.
I'm trying to get native crashes of our app symbolicated. Sentry and Play Console both show only raw offsets inside libNativeScript.so. Every release here ships a debug-symbols.zip, which looked like exactly what I needed, but unless I'm misreading things it doesn't match release builds: the gradle template picks the optimized runtime for release builds, while the published symbols are built from the regular flavor. Since Sentry and Play match symbols strictly by BuildID, the published symbols can only ever apply to debug builds, and production crashes stay unsymbolicated.
Describe the solution you'd like
Publish the unstripped optimized build as well (debug-symbols-optimized.zip or similar, or both flavors in one zip), the same way it's already done for the regular flavor. That would make production native crashes debuggable without any build changes on the app side. It might also be worth mentioning in the release notes which flavor the existing zip corresponds to.
Describe alternatives you've considered
- Setting
"android": { "useV8Symbols": true }so that release builds ship the regular flavor, which the published symbols do match. That works, but it means giving up -O3 and section gc on the runtime glue and shipping the inspector code in production, just to get matching symbols. - Building the runtime from source with symbols. Possible, but a lot of infrastructure for something the release pipeline here already produces for the other flavor.
- Living with unsymbolicated native frames.
Additional context
BuildIDs checked with v9.0.4 on arm64-v8a:
regular (npm AAR): BuildID[sha1]=d7c0ab67…, stripped
optimized (npm AAR): BuildID[sha1]=68bb8632…, stripped
optimized-with-inspector (npm AAR): BuildID[sha1]=d7c0ab67…, stripped
debug-symbols.zip: BuildID[sha1]=d7c0ab67…, with debug_info, not stripped
It took me a while with file and readelf to figure out why nothing matched, so hopefully this saves the next person the detour. And if I'm missing something and there is already a way to get matching symbols for the optimized runtime, happy to be corrected.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪创建 debug-symbols.zip 和优化版 AAR 的发布打包流程,然后比较常规 artifact 和优化版 artifact 的 BuildIDs。完成的标准是发布输出包含与优化版运行时匹配的调试符号,并且 artifact 名称或发布说明能够标识 flavor。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, cpp
- 领域
- build-system, mobile, release
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100