Open ahsonkhan opened 3 years ago
cc @RickWinter
Upload is failing with out of mem error on APIView side. I will look into it.
If I run the clang command in Windows Powershell to generate the AST, it adds a UTF-16 LE BOM to the AST file (0xFF 0xFE), and that is causing the api view tool to get tripped up.
Running it in bash which doesn't add the bom, or manually removing the BOM from the ast before zipping and uploading seems to fix the issue.
clang "azure/iot/az_iot_common.h" "azure/iot/az_iot_hub_client.h" "azure/iot/az_iot_provisioning_client.h" -Xclang -ast-dump=json -I E:/GitHub/Fork/azure-sdk-for-c/sdk/inc -I "C:/Program Files (x86)\Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29115/include" > az_iot_with_pnp_bash.ast
It would be useful if the JSON processing code was resilient against the presence of such BOMs and validated/skipped it.
@praveenkuttappan, sounds like this is just a bug in ApaView handling uploads with different BOMs more gracefully. If this turns into feature work specific to supporting embedded C in ApiView, let's get this over to the language team for follow up.
Here are the steps: Clone the embedded C SDK repo, open up powershell, create the ast and zip, and upload it to api view.
cc @praveenkuttappan, @pakrym