-
Notifications
You must be signed in to change notification settings - Fork 5
V3 casl 1466 v3 mom 10 #538
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
Conversation
Signed-off-by: Jakub Amanowicz <[email protected]>
Signed-off-by: Jakub Amanowicz <[email protected]>
Marcin-Here
left a comment
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.
🥇 good job! few minor comments.
here-naksha-lib-mom10/README.md
Outdated
|
|
||
| #### Populating old delta | ||
|
|
||
| | `@ns:com:here:mom:delta` properties supported in Naksha V2 (pre MOM 10) | equivalents in `meta.moderationInfo` (MOM 10+) | |
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.
Naksha V3*
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.
-> Naksha
here-naksha-lib-mom10/README.md
Outdated
| - we return feature in the same shape as it was given to Naksha in the writing phase | ||
|
|
||
| The class responsible for these operations | ||
| is [Mom10Transformation](../java/com/here/naksha/mom10/transform/Mom10Transformation.java). |
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 "src/jvmMain/java/com/here/naksha/mom10/Mom10Transformation.java" this would be working path for Mom10Transformation
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
| } | ||
|
|
||
| public static void dropPreMom10Namespaces(@Nullable NakshaFeature feature) { | ||
| NakshaProperties properties = feature.getProperties(); |
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.
If feature is Nullable, shouldn't we guard for that before calling .getProperties()?
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 definitely should! Fixed :)
|
|
||
| public class Mom10Verification { | ||
|
|
||
| private static final Pattern SHORT_SEM_VER = Pattern.compile("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\..+$"); |
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.
💍 🧙 🧝♂️
| } | ||
|
|
||
| private static @Nullable Integer getMajorFrom(@NotNull String modelVersion) { | ||
| Matcher matcher = SHORT_SEM_VER.matcher(modelVersion); |
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.
In tests we have case as ""8.91" so if this is possible version, then let's say "10.0" is also possible and if so then our regex "\..+$" would return false on it. Is this scenario possible?
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 is possible and we treat "10.0" as invalid value, "10.0.0" is ok though
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.
There was a mistake in tests though, fixed
| } | ||
|
|
||
| private static Stream<Named<VerificationCase>> shouldVerifyIfFeatureIsInMom10() { | ||
| return Stream.of( |
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.
if above comment about "10.0" scenario is possible, let's add tests for it. If no, ignore this comment.
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.
covered in fix :)
Signed-off-by: Jakub Amanowicz <[email protected]>
No description provided.