Conversation
| } | ||
|
|
||
| /** | ||
| * Populate the links for references based on a UID. Looker generates mappings for local context |
There was a problem hiding this comment.
| * Populate the links for references based on a UID. Looker generates mappings for local context | |
| * Populates the links for references based on a UID. Looker generates mappings for local context |
| type: "Class" | ||
| package: "com.microsoft.samples.google" | ||
| summary: "Settings class to configure an instance of <xref uid=\"com.microsoft.samples.google.v1p1alpha.SpeechClient\" data-throw-if-not-resolved=\"false\">SpeechClient</xref>.\n\n <p>The default instance has everything set to sensible defaults:\n\n <ul>\n <li>The default service address (speech.googleapis.com) and default port (443) are used.\n <li>Credentials are acquired automatically through Application Default Credentials.\n <li>Retries are configured for idempotent methods but not for non-idempotent methods.\n </ul>\n\n <p>The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n <p>For example, to set the total timeout of recognize to 30 seconds:\n\n <pre class=\"prettyprint lang-java\"><code>\n SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();\n speechSettingsBuilder\n .recognizeSettings()\n .setRetrySettings(\n speechSettingsBuilder\n .recognizeSettings()\n .getRetrySettings()\n .toBuilder()\n .setTotalTimeout(Duration.ofSeconds(30))\n .build());\n SpeechSettings speechSettings = speechSettingsBuilder.build();\n </code></pre>" | ||
| summary: "Settings class to configure an instance of <xref uid=\"com.microsoft.samples.google.SpeechClient\" data-throw-if-not-resolved=\"false\">SpeechClient</xref>.\n\n <p>The default instance has everything set to sensible defaults:\n\n <ul>\n <li>The default service address (speech.googleapis.com) and default port (443) are used.\n <li>Credentials are acquired automatically through Application Default Credentials.\n <li>Retries are configured for idempotent methods but not for non-idempotent methods.\n </ul>\n\n <p>The builder of this class is recursive, so contained classes are themselves builders. When\n build() is called, the tree of builders is called to create the complete settings object.\n\n <p>For example, to set the total timeout of recognize to 30 seconds:\n\n <pre class=\"prettyprint lang-java\"><code>\n SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();\n speechSettingsBuilder\n .recognizeSettings()\n .setRetrySettings(\n speechSettingsBuilder\n .recognizeSettings()\n .getRetrySettings()\n .toBuilder()\n .setTotalTimeout(Duration.ofSeconds(30))\n .build());\n SpeechSettings speechSettings = speechSettingsBuilder.build();\n </code></pre>" |
| * Since packages (v1 and v1beta) may contain the same generated java file names, there may be some | ||
| * conflicts between which link it should be. | ||
| * | ||
| * The Looker#consumer() function guarantees that the UID (+ other combinations) will be put into the LookupContext. |
| * Since packages (v1 and v1beta) may contain the same generated java file names, there may be some | ||
| * conflicts between which link it should be. |
There was a problem hiding this comment.
Can you add why Javac doesn't have the problem of ambiguity but this tool via javadoc has trouble finding the exact class?
| static String resolveUidFromLinkContent(String linkContent, String packageName, LookupContext lookupContext) { | ||
| if (StringUtils.isBlank(linkContent)) { |
|
@lqiu96 Is this PR still needed? I'm happy to help take it on if this fix is still needed; just wanted to double check. |
Unfortunately, I didn't create an issue with what I was fixing (my mistake), so I forgot what this is trying to fix. IIRC (and could be wrong), this was trying to fix link references in one package (v1) from referencing another package (v1beta1) if there are duplicates. Link references should try to find the reference in the same package. I think this is something that should be fixed eventually. |


Fixes #<issue_number_goes_here>