-
-
Notifications
You must be signed in to change notification settings - Fork 748
Description
Search Terms
Merge, JSON, Separated, Declaration, Common Documentation, Inter-Package References
Problem
When merging generated JSON output for multiple repositories to create a common documentation using --merge inter-repo reflections do not resolve. This is despite the required information being in the symbolIdMap in the form of qualifiedName. I suspect this is because the sourceFileName does not match, that or merge functionality has not implemented this despite cross-package references working within packages according to the reference implementation. Either way there appears to be enough information to match the reflections.
Example:
To show what I mean I have taken (and redacted slightly) an example from one of the documentation merges I am seeing this problem in:
Within one package we can see the following reference for a parameter:
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/@initech/core/lib/context.ts"
"qualifiedName": "RequestContext"
},
"name": "RequestContext",
"package": "@initech/core"
}In the output for @initech/core we have the following in the symbolIdMap:
"316": {
"sourceFileName": "lib/context.ts",
"qualifiedName": "RequestContext"
},And at the root of the object we can see that packageName is correctly set to @initech/core.
Suggested Solution
If the problem is in fact the mismatched sourceFileName. We can't rely on this, however we can instead match on the packageName, which means when merging we need to make sure we preserve the packageName inside the symbol mappings.