-
Notifications
You must be signed in to change notification settings - Fork 8
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
docs(dafny-java-conversion): JavaDocs for ToNative Blob & Double #252
Conversation
Here are my top-level suggestions on this:
|
ToNative.Simple
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.
Very nice work on the javadoc - I don't expect anyone to reference the methods directly, but you're adding a lot of useful design/implementation detail that future us will thank you for. :)
The nitpicking to the actual docstrings are stronger than the code suggestions I made because I happened to see them - I know the latter are not intended to be in scope for this PR so happy to address those later.
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Show resolved
Hide resolved
|
||
/** | ||
* @param aString The Java type for a String is {@link String}. | ||
* @return The Dafny Runtime type for a String is A {@link DafnySequence} of {@link Character}s. |
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 mention "when --unicode-char
is false
".
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 did not know this.
Can this be a more generic comment?
i.e:
* @return The Dafny Runtime type for a String is A {@link DafnySequence} of {@link Character}s. | |
* @return The Dafny Runtime type for a String can be a {@link DafnySequence} of {@link Character}s, | |
* if Dafny is configured to NOT use Unicode characters. |
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 "IS A" is more accurate, since it will always be a DafnySequence<Character>
if --unicode-char
is false
(and I would avoid "Unicode characters" as that's highly overloaded and misused :) )
FYI we'll probably add more overloads in the future with statements like The Dafny Runtime type for a String is A {@link DafnySequence} of {@link dafny.CodePoint}s if Dafny is configured with --unicode-char set to true
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
// SET("set", SetShape.class, Category.AGGREGATE), | ||
// TODO: Frankly, we should avoid Dafny Sets since they do not preserve order; | ||
// Smithy 2.0 deprecates Sets for Unique Lists to ensure order is preserved. | ||
// But, we would need to implement our own Dafny Ordered Set... |
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 note I'll cut a separate PR to update the README |
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.
Responding to comments.
Will pull down and address outstanding requests.
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
smithy-dafny-conversion/src/main/java/software/amazon/smithy/dafny/conversion/ToDafny.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Robin Salkeld <[email protected]>
…afny/conversion/ToDafny.java Co-authored-by: Robin Salkeld <[email protected]>
…-dafny into tony/docs-java-conversion
…s-java-conversion # Conflicts: # smithy-dafny-conversion/build.gradle.kts
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.
Ship it
Issue #, if available: [Polymorph][Java] Clean up Dafny-Java-Conversion Javadocs
Description of changes:
State
software.amazon.dafny.conversion
->software.amazon.smithy.dafny.conversion
(or sed
software.amazon.dafny.conversion
->software.amazon.smithy.dafny.conversion
)By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.