raducotescu commented on a change in pull request #2:
URL:
https://github.com/apache/sling-org-apache-sling-graphql-schema-aggregator/pull/2#discussion_r679878099
##########
File path:
src/main/java/org/apache/sling/graphql/schema/aggregator/impl/Partial.java
##########
@@ -48,12 +47,24 @@
TYPES
}
- /** The name of this partial */
- @NotNull String getName();
+ /**
+ * Returns the partial info.
+ *
+ * @return the partial info
+ */
+ @NotNull PartialInfo getPartialInfo();
/** Return a specific section of the partial, by name */
@NotNull Optional<Section> getSection(SectionName name);
/** Names of the Partials on which this one depends */
- @NotNull Set<String> getRequiredPartialNames();
+ @NotNull Set<PartialInfo> getRequiredPartialNames();
+
+ /**
+ * Returns the SHA256 hash of the source that was used to build this
partial.
+ *
+ * @return the SHA256 hash of the source that was used to build this
partial
+ */
+ @NotNull String getSHA256Hash();
Review comment:
Let's do it like this then, because it's the best compromise: we call
the method `getDigest / getHash` but we force implementations to provide the
output in this format:
```
algorithm: hash
```
This way two partials can be the same irrespective of their provider if the
various implementations hash the source in the same way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]