Skip to content

Eliminate bad error reporting "Value was null" #11052

@atsushieno

Description

@atsushieno

Is your feature request related to a problem? Please describe.

vcpkg became valuable to me now that it started to support Android prefab (#10271), so I started evaluating current ports. So far I cannot "export" AAR for unknown reason. And this seems to happen to everywhere in vcpkg tool itself has some bogus code that only avoids runtime crash.

It is not appropriate. We need at least information on why and/or where it crashed.

Proposed solution

  • Give error details on each caller to check_exit().
  • Give error codes (either in MSBuild style or not).

Additional context

Here is an example reproducible steps I had (Ubuntu 19.10, Android SDK at standard location ~/Android/Sdk with NDK):

  • ./bootstrap-vcpkg.sh -disableMetrics
  • export ANDROID_NDK_HOME=~/Android/Sdk/ndk/21.0.6113669
  • create triplets/arm64-android.cmake (below)
  • ./vcpkg install jsoncpp:arm64-android
  • ./vcpkg export --triplet arm64-android jsoncpp --prefab --prefab-maven (as docs/specifications/prefab.md describes.)

File content for triplets/arm64-android.cmake:

set(VCPKG_TARGET_ARCHITECTURE arm64-v8a)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Android)

The output from the last command:

The following packages are already built and will be exported:
    jsoncpp:arm64-android
Value was null

revision: 28ab0b1

Metadata

Metadata

Labels

category:vcpkg-featureThe issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions