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

Doc generation for TypeScript not working even with the basic example #6791

Closed
Ellerbach opened this issue Nov 20, 2020 · 8 comments
Closed
Labels
extensibility Extend the platform to support new languages, new outputs and custom behaviors

Comments

@Ellerbach
Copy link
Member

Operating System: Windows

DocFX Version Used: choco install docfx -y

Template used: default

Steps to Reproduce:

I've done exactly the steps from the doc: https://dotnet.github.io/docfx/tutorial/universalreference/gen_doc_for_ts.html
TypeScript 3.9 or TypeScript 4.0 give the same result

Expected Behavior:

Generate the docs.

Actual Behavior:

The api.json is generated
The yml files are all generated.
Only TOC generated in _site. All the rest is ignored.
Tested also on some other TypeScript, well documented application and same issue. Only TOC is generated.

[20-11-20 05:47:44.305]Info:[BuildCommand]6 plug-in(s) loaded.
[20-11-20 05:47:44.383]Info:[BuildCommand]Markdown engine is dfm
[20-11-20 05:47:44.548]Info:[BuildCommand.BuildCore.Build Document]Max parallelism is 8.
[20-11-20 05:47:45.178]Warning:[BuildCommand.BuildCore.Build Document.Load]Unable to handle following files: yml/blob_upload.blob_upload_result.yml,yml/device_method.device_method_request.DeviceMethodRequest.yml,yml/device_method.index.MethodResult.yml,yml/interfaces.TokenRenewalValues.yml,yml/module_client.ModuleClient.yml,yml/twin.Twin.yml,yml/device_client.Client.yml,yml/device_client.yml,yml/device_method.index.MethodCallback.yml,yml/interfaces.AmqpTransportOptions.yml,yml/interfaces.yml,yml/module_client.yml,yml/twin.TwinProperties.yml,yml/blob_upload.blob_upload_client.yml,yml/device_method.device_method_response.yml,yml/interfaces.DeviceClientOptions.yml,yml/internal_client.DeviceTransport.yml,yml/sak_authentication_provider.yml,yml/x509_authentication_provider.yml,yml/blob_upload.blob_upload_errors.yml,yml/device_method.device_method_request.yml,yml/device_method.method_client.yml,yml/interfaces.HttpReceiverOptions.yml,yml/internal_client.TransportCtor.yml,yml/sas_authentication_provider.SharedAccessSignatureAuthenticationProvider.yml,yml/twin_errors.yml,yml/blob_upload.blob_uploader.yml,yml/interfaces.RestErrorStub.yml,yml/iotedge_authentication_provider.yml,yml/blob_upload.file_upload_api.yml,yml/device_method.device_method_exchange.DeviceMethodExchange.yml,yml/device_method.index.yml,yml/interfaces.HttpTransportOptions.yml,yml/internal_client.yml,yml/sas_authentication_provider.yml,yml/utils.yml,yml/connection_string.yml,yml/device_method.device_method_exchange.yml,yml/device_method.index.MethodParams.yml,yml/interfaces.BlobUploadCommonResponseStub.yml,yml/internal_client.BlobUpload.yml,yml/sak_authentication_provider.SharedAccessKeyAuthenticationProvider.yml,yml/twin.yml,yml/blob_upload.index.yml,yml/device_method.device_method_response.DeviceMethodResponse.yml,yml/index.yml,yml/interfaces.MqttTransportOptions.yml,yml/iotedge_authentication_provider.IotEdgeAuthenticationProvider.yml,yml/shared_access_signature.yml,yml/x509_authentication_provider.X509AuthenticationProvider.yml. Do they miss `YamlMime` as the first line of file, e.g.: `### YamlMime:ManagedReference`?
[20-11-20 05:47:45.744]Info:[BuildCommand.BuildCore.Build Document.CompilePhaseHandlerWithIncremental.TocDocumentProcessor]Building 1 file(s) in TocDocumentProcessor(BuildTocDocument)...
[20-11-20 05:47:45.950]Info:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateContext]0 external references found in 1 xref maps.
[20-11-20 05:47:46.008]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.013]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.blob_uploader" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.014]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.blob_upload_client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.015]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.blob_upload_errors" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.016]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.blob_upload_result" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.016]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.file_upload_api" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.017]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.blob_upload.index" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.017]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.connection_string" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.018]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.018]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_client.Client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.019]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_exchange" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.019]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_exchange.DeviceMethodExchange" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.020]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_request" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.021]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_request.DeviceMethodRequest" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.022]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_response" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.022]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.device_method_response.DeviceMethodResponse" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.023]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.index" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.024]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.index.MethodCallback" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.025]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.index.MethodParams" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.026]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.index.MethodResult" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.026]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.device_method.method_client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.027]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.027]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.AmqpTransportOptions" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.028]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.BlobUploadCommonResponseStub" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.028]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.DeviceClientOptions" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.029]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.HttpReceiverOptions" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.029]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.HttpTransportOptions" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.029]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.MqttTransportOptions" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.030]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.RestErrorStub" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.030]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.interfaces.TokenRenewalValues" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.030]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.internal_client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.030]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.internal_client.BlobUpload" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.031]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.internal_client.DeviceTransport" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.031]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.internal_client.TransportCtor" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.031]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.iotedge_authentication_provider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.031]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.iotedge_authentication_provider.IotEdgeAuthenticationProvider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.032]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.module_client" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.032]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.module_client.ModuleClient" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.032]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.sak_authentication_provider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.033]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.sak_authentication_provider.SharedAccessKeyAuthenticationProvider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.033]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.sas_authentication_provider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.033]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.sas_authentication_provider.SharedAccessSignatureAuthenticationProvider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.034]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.shared_access_signature" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.034]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.twin" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.035]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.twin.Twin" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.037]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.twin.TwinProperties" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.038]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.twin_errors" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.038]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.utils" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.038]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.x509_authentication_provider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.038]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateHref](yml/toc.yml)Unable to find file with uid "azure-iot-device.x509_authentication_provider.X509AuthenticationProvider" referenced by TOC file "yml/toc.yml"
[20-11-20 05:47:46.068]Info:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.Apply Templates]Applying templates to 1 model(s)...
[20-11-20 05:47:46.302]Info:[BuildCommand.BuildCore.Build Document]XRef map exported.
[20-11-20 05:47:46.450]Info:[BuildCommand.Postprocess]Manifest file saved to manifest.json.
[20-11-20 05:47:46.537]Info:[BuildCommand]Completed building documents in 2218,1729 milliseconds.
Serving "C:\tmp\azure-iot-sdk-node\_site" on http://localhost:8080
@VoodbooV
Copy link

VoodbooV commented Dec 2, 2020

Same Issue here, I think there is a problem with type2docfx which generates yml files with '### YamlMime:TSType' or '### YamlMime:TSPackage'. I've changed em manually to '### YamlMime:UniversalReference' with no success

@superyyrrzz
Copy link
Contributor

superyyrrzz commented Dec 2, 2020

@yunair This issue is caused by UDP2SDP work. It breaks the template community uses.

I think a history version of type2docfx using UDP can still work for community template. Can you add some information here?

@yunair
Copy link
Contributor

yunair commented Dec 3, 2020

@superyyrrzz yes, UDP2SDP has breaking changes. so latest version can't run into docfxv2.
history version of type2docfx can still work.
please help to update the doc,
change this npm install -g typedoc type2docfx to npm install -g typedoc type2docfx@0.10.5.
it will work as expected.

@superyyrrzz
Copy link
Contributor

@Ellerbach @VoodbooV Could you try version 0.10.5?

npm install -g typedoc type2docfx@0.10.5

@VoodbooV
Copy link

VoodbooV commented Dec 3, 2020

@superyyrrzz
Problem solved with "type2docfx@0.10.5", thanks, gonna be waiting for further stuff!

mode777 added a commit to mode777/docfx that referenced this issue Jul 19, 2022
Typescript example is broken as discussed here dotnet#6791 (dotnet#6791). Re-verting to older npm package 0.10.5 for type2docfx fixes it for now.
herohua pushed a commit that referenced this issue Aug 26, 2022
Typescript example is broken as discussed here #6791 (#6791). Re-verting to older npm package 0.10.5 for type2docfx fixes it for now.
@yufeih yufeih added the extensibility Extend the platform to support new languages, new outputs and custom behaviors label Dec 15, 2022
@mcm-ham
Copy link
Contributor

mcm-ham commented May 12, 2023

Does anyone know what the plan is for Typescript documentation support in docfx is? According to docascode/type2docfx#63 we need to use typedoc@0.15.0 and type2docfx@0.10.5 which I've been doing but the Typescript compiler 3.5.3 is now so old it's not a viable workaround anymore. I assume https://www.npmjs.com/package/@microsoft/type2docfx that points to an archived repo means development has continued in private repo and is for use only with Microsoft Learn's site instead. Or is the plan that if this issue gets implemented we can then use that package instead?

Edit:
For those interested I've created a script to convert yml output from @microsoft/type2docfx 2.0.6 to type2docfx 0.10.5. There's still some rough edges but at least I can use Typescript 5 now.
https://gist.github.com/mcm-ham/8814e5cdacc379ef8aa2c39b834e982f

@yufeih
Copy link
Contributor

yufeih commented May 12, 2023

I assume https://www.npmjs.com/package/@microsoft/type2docfx that points to a archived repo means development has continued in private repo and is for use with Microsoft Learn's site instead. Or is the plan that if this issue gets implemented we can then use that package instead?

@microsoft/type2docfx has been closed source developed for MS Learn only. I'm not aware of any plan for it to support open source.

@yufeih
Copy link
Contributor

yufeih commented Dec 1, 2023

dup of #5749

@yufeih yufeih closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility Extend the platform to support new languages, new outputs and custom behaviors
Projects
None yet
Development

No branches or pull requests

6 participants