-
Notifications
You must be signed in to change notification settings - Fork 602
Review and Fix All Slice Doc-Comments #4350
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
Review and Fix All Slice Doc-Comments #4350
Conversation
|
||
module IceGrid | ||
{ | ||
// This class is no longer used. We keep it only for interop with IceGrid 3.7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment says the class is only for interop, and it's not even a doc-comment.
So I marked this deprecated to signal that it shouldn't be used for new projects.
Is this fine? Or should it be left un-deprecated so users don't see deprecation warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're editing Internal.ice. It's not a public file.
InternalAdapterDescriptorSeq adapters; | ||
|
||
// Not used, always empty. Kept only for interop with IceGrid 3.7. | ||
InternalDbEnvDescriptorSeq dbEnvs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same idea: should this stay undeprecated even if it's never used anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback: since it's Internal, the deprecated is only going to affect internal code. You may need to update some code to turn-off these warnings.
/// Activate this adapter. If this adapter can be activated, this will activate the adapter and return the | ||
/// direct proxy of the adapter once it's active. If this adapter can be activated on demand, this will return | ||
/// `null` if the adapter is inactive or the adapter direct proxy it's active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- These lines were over the 120 column limit.
this will return 0
is impossible. I'm just hoping we meantnull
here.
/// @param proxy The direct proxy. | ||
/// The direct proxy should be created with the object adapter and should contain the object adapter endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also over the 120 column limit.
interface Node extends FileReader, ReplicaObserver | ||
{ | ||
/// Load the given server. If the server resources weren't already created (database environment directories, | ||
/// property files, etc), they will be created. The returned proxy is never null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea where there's extra indentation here.
Removed.
|
||
/// Called to accept an invitation into the given group. | ||
/// @param j The id of the node accepting the invitation. | ||
/// @param observer The observer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also out of order here.
/// @return The replica proxy, or `null` if this instance is not replicated. | ||
["cpp:const"] idempotent IceStormElection::Node* getReplicaNode(); | ||
} | ||
} // End module IceStorm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why even comment this?
Deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's common in C++, especially when using the same indentation level for several constructs (namespace, class).
Now that we use a nicer indentation for Slice, it's not helpful
# globally by setting AUTOLINK_SUPPORT to NO. | ||
# The default value is: YES. | ||
|
||
AUTOLINK_SUPPORT = YES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable AUTOLINKing in Slice.
|
||
module Test2 | ||
{ | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be a doc-comment.
It's /*
in ever of language's operation/Test.ice
file.
/// If a non-null session proxy is returned, it must be configured to route through the router that created it. | ||
/// This occurs automatically when the router is configured as the client's default router at the time the | ||
/// session proxy is created in the client application; otherwise, the client must configure the session proxy | ||
/// explicitly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally we place @see
after the operation tags.
string reason; | ||
} | ||
|
||
/// The exception that is thrown when a server failed to start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bad copy-paste from ServerStartException
directly above here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR comprehensively reviews and fixes all doc-comments in Slice files across the codebase. The primary purpose is to address issue #4329 by adding proper links where AUTOLINK was previously used, while also correcting formatting errors, grammatical mistakes, and inconsistent documentation throughout.
Key changes include:
- Replacement of implicit references with proper
{@link}
syntax for cross-references - Correction of parameter references using
@p
notation - Fix of grammatical errors and formatting inconsistencies
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
swift/test/Ice/hold/Test.ice | Updated parameter references and method names in code blocks |
slice/IceStorm/IceStorm.ice | Added link formatting and corrected parameter references |
slice/IceLocatorDiscovery/Lookup.ice | Enhanced cross-references with proper link syntax |
slice/IceGrid/Session.ice | Improved parameter references and cross-links |
slice/IceGrid/Registry.ice | Minor wording improvements for consistency |
slice/IceGrid/FileParser.ice | Enhanced cross-reference formatting |
slice/IceGrid/Exception.ice | Fixed incorrect exception description |
slice/IceGrid/Descriptor.ice | Added sequence type links and formatting fixes |
slice/IceGrid/Admin.ice | Improved formatting and cross-references |
slice/IceDiscovery/Lookup.ice | Enhanced interface references with proper links |
slice/Ice/Router.ice | Grammar and formatting improvements |
slice/Ice/RemoteLogger.ice | Enhanced cross-references and parameter formatting |
slice/Ice/Metrics.ice | Corrected pluralization and parameter references |
slice/Ice/LocatorRegistry.ice | Enhanced cross-references and parameter formatting |
slice/Ice/Locator.ice | Removed redundant link formatting |
slice/Ice/Context.ice | Minor grammar correction |
slice/Glacier2/Session.ice | Grammar fixes and enhanced cross-references |
slice/Glacier2/Router.ice | Reorganized see-also references |
slice/Glacier2/PermissionsVerifier.ice | Grammar correction |
js/test/Ice/operations/Test.ice | Changed multi-line to single-line comment |
java/test/src/main/java/test/Ice/location/Test.ice | Pluralization fix |
java/test/src/main/java/test/Ice/hold/Test.ice | Parameter and method reference improvements |
doxygen/Doxyfile | Disabled AUTOLINK_SUPPORT |
csharp/test/Ice/hold/Test.ice | Parameter and method reference improvements |
cpp/test/Ice/hold/Test.ice | Parameter and method reference improvements |
cpp/src/IceStorm/LinkRecord.ice | Enhanced cross-references |
cpp/src/IceStorm/IceStormInternal.ice | Comprehensive formatting and reference improvements |
cpp/src/IceStorm/Election.ice | Parameter reordering and formatting fixes |
cpp/src/IceGrid/Internal.ice | Extensive formatting and reference improvements |
cpp/src/DataStorm/Contract.ice | Enhanced cross-references and formatting |
cpp/include/Ice/ObjectAdapter.h | Comment formatting fix |
cpp/include/DataStorm/Node.h | Comment formatting fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
/// The exception that is thrown when a server failed to start. | ||
/// The exception that is thrown when a server failed to stop. | ||
exception ServerStopException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment describes an exception for when a server failed to stop, but the exception name is ServerStopException
. This is contradictory - if this exception is thrown when a server failed to stop, it should be named something like ServerStopFailedException
. Either the comment or the exception name is incorrect.
exception ServerStopException | |
exception ServerStopFailedException |
Copilot uses AI. Check for mistakes.
cpp/src/DataStorm/Contract.ice
Outdated
interface SubscriberSession extends Session | ||
{ | ||
/// Queue a sample with the subscribers of the topic element. | ||
/// Queue a @p sample with the subscribers of the topic element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be either "queue @p sample" or "queue a sample", not a mix of both.
Also, all these purely internal doc-comments aren't that important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
cpp/src/DataStorm/Contract.ice
Outdated
/// The lookup interface is used by DataStorm nodes to announce their topic readers and writers to other connected | ||
/// nodes. When multicast is enabled, the lookup interface also broadcasts these announcements. | ||
/// Each DataStorm node hosts a lookup servant with the identity "DataStorm/Lookup". | ||
/// Each DataStorm node hosts a lookup servant with the identity `'DataStorm/Lookup'`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A code span without quotes is sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I updated all our identity examples to just use a code-span with nothing else.
|
||
module IceGrid | ||
{ | ||
// This class is no longer used. We keep it only for interop with IceGrid 3.7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're editing Internal.ice. It's not a public file.
InternalAdapterDescriptorSeq adapters; | ||
|
||
// Not used, always empty. Kept only for interop with IceGrid 3.7. | ||
InternalDbEnvDescriptorSeq dbEnvs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback: since it's Internal, the deprecated is only going to affect internal code. You may need to update some code to turn-off these warnings.
/// @param gn The group name. | ||
/// @param j The group coordinator. | ||
/// @param gn The group name. | ||
void invitation(int j, string gn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And Slice compiler did not issue a warning?
/// @return The replica proxy, or `null` if this instance is not replicated. | ||
["cpp:const"] idempotent IceStormElection::Node* getReplicaNode(); | ||
} | ||
} // End module IceStorm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's common in C++, especially when using the same indentation level for several constructs (namespace, class).
Now that we use a nicer indentation for Slice, it's not helpful
slice/Ice/LocatorRegistry.ice
Outdated
/// @param proxy A proxy to the {@link Process} object of the server. This proxy is never null. | ||
/// @throws ServerNotFoundException Thrown when the locator does not know a server application with this server | ||
/// ID. | ||
/// @p id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be "with server ID @p id".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. I see what you mean.
slice/Ice/Metrics.ice
Outdated
throws UnknownMetricsView; | ||
|
||
/// Gets the metrics objects for the given metrics view. | ||
/// Gets the metrics objects for the given metrics @p view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be: "... for the metrics view @p view"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Felt more natural to remove the @p
here.
throws UnknownMetricsView; | ||
|
||
/// Gets the metrics failures associated with the given view and map. | ||
/// Gets the metrics failures associated with the given @p view and @p map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove "given". You mark them as parameters, they are clearly "given".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use 'given' all the time in our Slice files, so I'm going to leave it for now to get this merged.
Can always re-review all our comments again in the future.
slice/Ice/RemoteLogger.ice
Outdated
interface LoggerAdmin | ||
{ | ||
/// Attaches a RemoteLogger object to the local logger. This operation calls {@link RemoteLogger#init} on @p prx. | ||
/// Attaches a {@link RemoteLogger} object to the local logger. This operation calls {@link RemoteLogger#init} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought operation-referencing syntax was "::", not "#".
You use both in this PR. Are they both correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doxygen supports #
anywhere where ::
can appear but not the other way.
So, this does work, but we really should use ::
for operations. This one just slipped by me.
Fixed.
I manually reviewed every single doc-comment in every Slice file.
Originally I was just fixing #4329 (which this PR does), by adding links to places where AUTOLINK used to.
But I also came across lots of bad formatting, incorrect comments, and bad grammar.
So I ended up just fixing everything.
I tried using Copilot on the larger files (Contract.ice, Admin.ice), but it goes too crazy rewriting sentences instead of just fixing objective mistakes. Unfortunate.