-
Notifications
You must be signed in to change notification settings - Fork 145
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
3139 rust projects names #3157
3139 rust projects names #3157
Conversation
@maxonfjvipon WDYT |
private static String translate(final String clazz, final String method) { | ||
return String.format( | ||
"Java_%s_%s", | ||
clazz.replace("_", "_1").replace(".", "_"), |
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.
@levBagryansky I didn't get what is "_1"
for
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 There are 2 refs in commentary: https://stackoverflow.com/questions/32470463/what-is-the-naming-convention-for-java-native-interface-method-and-module-name">stackoverflow
Or, according to oracle spec:
Escape Sequence | Denotes |
---|---|
_1 | the character “_” |
_2 | the character “;” in signature |
_3 | the character “[“ in signatures |
In our case we have "_"
only
@@ -58,4 +58,32 @@ public PrimeModule(final String method, final String file) { | |||
file | |||
); | |||
} | |||
|
|||
/** | |||
* Translates ("mangles") Java method name to native method name. |
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.
@levBagryansky let's add an example to the doc. Something like "before -> after"
@maxonfjvipon please check |
@yegor256 please check |
@rultor merge |
@levBagryansky @yegor256 Oops, I failed. You can see the full log here (spent 22min) |
@yegor256 please merge |
@yegor256 please check |
@rultor merge |
Closes #3139
PR-Codex overview
This PR enhances the Rust integration in the Maven plugin by updating file paths, adding a Rust function, and improving naming conventions.
Detailed summary