NativeScript / NativeScript/android

Publish debug symbols for nativescript-optimized.aar, not only for nativescript-regular.aar

Aberta
#1,982 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
C++
Estrelas
563
Forks
144
Merge médio
10h 46min
PRs com merge (30d)
14

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece rastreando o empacotamento da release que cria debug-symbols.zip e o AAR otimizado; em seguida, compare os BuildIDs dos artefatos regular e otimizado. O trabalho estará concluído quando as saídas da release incluírem símbolos de depuração correspondentes ao runtime otimizado, e o nome do artefato ou as release notes identificarem o flavor.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
android, cpp
Domínio
build-system, mobile, release
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
52/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.