### Describe the Issue See #11554 . Notice the error message there has two periods at the end: ``` Consider including proxy configuration in the reflection section of reachability-metadata.md instead.. ``` The reason for this is inconsistency between the values of the `deprecationMessage` attribute and callsites that interpolate those values. From Copilot: Here is a list of all code locations in the Graal codebase that call `getDeprecationMessage()` on `OptionDescriptor` for the purpose of interpolating it into a message string. For each, I indicate whether a "." is prepended (inserted before or after the deprecation message), so you can decide if the period should be in the attribute or in the interpolation code. --- ### 1. substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/SubstrateOptionsParser.java **Location:** [parseHostedOption method](https://github.com/oracle/graal/blob/3cc8e5a8139083e7d0648cfbb1b1d282c6891d4c/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/SubstrateOptionsParser.java#L77-L141) **Usage:** ```java if (deprecationMessage != null && !deprecationMessage.isEmpty()) { message += ": " + deprecationMessage; } message += ". Please refer to the GraalVM release notes."; ``` - **"." prepended or appended?**: **Appended after the deprecation message** (always adds a period after, regardless of whether it's already in the message). --- ### 2. substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/RuntimeOptionParser.java **Location:** [parseOptionAtRuntime method](https://github.com/oracle/graal/blob/3cc8e5a8139083e7d0648cfbb1b1d282c6891d4c/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/RuntimeOptionParser.java#L159-L237) **Usage:** ```java if (deprecationMessage != null && !deprecationMessage.isEmpty()) { log.string(": ").string(deprecationMessage); } log.newline(); ``` - **"." prepended or appended?**: **No period added by the code** (the message is interpolated as-is). --- ### 3. sdk/src/org.graalvm.launcher/src/org/graalvm/launcher/Launcher.java **Location:** [argument parsing logic](https://github.com/oracle/graal/blob/3cc8e5a8139083e7d0648cfbb1b1d282c6891d4c/sdk/src/org.graalvm.launcher/src/org/graalvm/launcher/Launcher.java#L816-L919) **Usage:** ```java String messageFormat = "Option '%s' is deprecated and might be removed from future versions."; String deprecationMessage = descriptor.getDeprecationMessage(); String message; if (deprecationMessage != null) { message = String.format(messageFormat + "%n%s", descriptor.getName(), deprecationMessage); } else { message = String.format(messageFormat, descriptor.getName()); } warn(message); ``` - **"." prepended or appended?**: **No period added before or after the deprecation message** (since the format string already ends in a period, the deprecation message starts on a new line). --- ### 4. truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java **Location:** [printDeprecatedOptionsWarning method](https://github.com/oracle/graal/blob/3cc8e5a8139083e7d0648cfbb1b1d282c6891d4c/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/PolyglotEngineImpl.java#L614-L706) **Usage:** ```java String.format("Option '%s' is deprecated: %s. Please update the option or suppress this warning using the option 'engine.WarnOptionDeprecation=false'.", key.getName(), key.getDeprecationMessage()) ``` - **"." prepended or appended?**: **A period is always appended after the deprecation message** (regardless of whether the message already ends with a period). --- ### 5. substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/RuntimeOptionValues.java **Location:** [asDescriptor helper method](https://github.com/oracle/graal/blob/3cc8e5a8139083e7d0648cfbb1b1d282c6891d4c/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/option/RuntimeOptionValues.java#L64-L158) **Usage:** ```java return new DescriptorImpl(descriptor.getName(), help, ..., descriptor.isDeprecated(), descriptor.getDeprecationMessage()); ``` - **"." prepended or appended?**: **N/A** (just stores the value, not for message printing). --- ### Summary Table | File/Method | Appends/prepends "." to deprecation message? | |------------------------------------------------------------------|:--------------------------------------------:| | SubstrateOptionsParser.parseHostedOption | Yes, always appends a period after | | RuntimeOptionParser.parseOptionAtRuntime | No period added | | Launcher.java (argument parsing) | No period added | | PolyglotEngineImpl.printDeprecatedOptionsWarning | Yes, always appends a period after | | RuntimeOptionValues (DescriptorImpl record) | N/A (not message interpolation) | --- **Conclusion:** - Some places (SubstrateOptionsParser, PolyglotEngineImpl) always append a period after the deprecation message, even if one is already present. - Others (RuntimeOptionParser, Launcher) do not add a period, and print the deprecation message as-is. - There is inconsistency, so it's best to ensure the **code that interpolates the deprecation message is responsible for punctuation**, NOT the message itself, to avoid double periods (". ."). [View more results in GitHub code search](https://github.com/oracle/graal/search?q=getDeprecationMessage%28%29). Let me know if you need the result for additional files or more details! ### Using the latest version of GraalVM can resolve many issues. - [ ] I tried with the [latest version](https://www.graalvm.org/downloads/) of GraalVM. ### GraalVM Version See #11554. ### Operating System and Version See #11554. ### Build Command See #11554. ### Expected Behavior Error messages do not have "..". ### Actual Behavior Error messages do have ".." ### Steps to Reproduce See #11554. ### Additional Context _No response_ ### Build Log Output and Error Messages _No response_