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
Reduce code duplication down to 16 lines per piece #2920
Reduce code duplication down to 16 lines per piece #2920
Conversation
@c71n93 what's up with this one? still a draft? |
@yegor256 still working on it |
@maxonfjvipon could you check this one, please? |
1 similar comment
@maxonfjvipon could you check this one, please? |
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.
@c71n93 I am not sure that uniting of these lines is real solution of the duplication problem
String.format(
"Object inside %s has wrong class %s",
src,
result.getClass()
)
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.
@c71n93 looks good. Even if you're not sure, the final result speaks for itself
@levBagryansky Yes, but I don't see any other options. This methods are located in different independent subprojects ( The only solution I see is to create a dependency between subprojects (or create some |
@yegor256 could you please check this one? |
@maxonfjvipon I see |
@maxonfjvipon As for me, it's not so bad to create a component on which |
@levBagryansky in the process of compilation eo program we download |
src, | ||
result.getClass() | ||
) | ||
String.format("Object inside %s has wrong class %s", src, result.getClass()) |
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.
@c71n93 maybe it's better to slightly change the message?
"File %s contains invalid data", | ||
src | ||
), | ||
String.format("File %s contains invalid data", src), |
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.
@c71n93 same here: maybe it's better to slightly change the message?
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.
@maxonfjvipon Such architecture violates SRP: Maintaining of the map deserialization is in different classes, even in different modules. Whatever tests we write here, this code will fall off the user in production one day and we will all be fired. |
54c603b
to
9f46272
Compare
@levBagryansky then I can ask, why are they in different modules? Maybe it's the main problem? Because you're offering to sacrifice eo-runtime independence (which has highest priority) for the sake of the SPR and your convenience |
@maxonfjvipon That's how they should be in the same module. The architecture does not allow this to be done. |
9f46272
to
6b317f8
Compare
@rultor merge |
Related to #2863
PR-Codex overview
This PR updates Simian configuration and improves logging in EOlang codebase.
Detailed summary
EOrust.java
EOstdoutTest.java
DataizedTest.java