Milestone
With SDK [0.9.9-RELEASE] and plugin [0.4.0]
Since 2024-05-10
, this upgrade may introduce code broken!
This milestone for the eventually SDK 1.0.0 release preparation;
cn_message
to message2
Rename Remove the support for cn_message
use the message2
instead for the constant option;
message Meta {
//this is the code of this constant, without the offset
//the framework will hand this stuff
int32 code = 1;
// this is the description of this constant
// this should be primary language supported(for example english)
string message = 2;
// Deprecated since 2024-05-08 from logic
// Then will be removed before 1.0.0 official version
// eventually use the i18n to solve this issue
string cn_message = 3 [deprecated = true];
// this is another description of this constant
// This will be the second language supported(for example chinese)
string message2 = 4;
// those for the error extension
// if this set then this will
Error error = 5;
}
0.4.0
+0.9.8-RELEASE
+{PROJECT}/gradle/libs.versions.toml
apihug = "OLD_VERSION"
-> 0.9.8-RELEASE
+descriptionZhCN
overwrite illegal;setDescriptionZhCN
of the enum replace them with setDescription2
; (for error description upgrade)descriptionZhCN
of the enum replace them with description2
; (for enum description upgrade)cn_message
in proto
to message2
, as the cn_message
will be removed soon.after all the error gone, then rebuild, everything goes well again!
in the hope-wire.json
define:
{
"persistence": {
"identifyType": "LONG",
"tenantType": "LONG",
"format": "CAMEL",
"upper": "UPPER"
}
}
Format:
DEFAULT
: as old framework, convert to SNAKE
styleCAMEL
: myVariableName
SNAKE
: my_variable_name
Upper:
DEFAULT
:as old framework, convert to UPPER
styleUPPER
: name
-> NAME
LOWER
: NAME
-> name
CAPITALIZE
: userName
-> UserName
hope.common.persistence.plugin.NameMappingStrategy
client plugin to rename the column name.case 3, the column will always be MY_USER_NAME
as manually set as: name: "MY_USER_NAME"
;
string user_name = 1 [(hope.persistence.column) = {
name: "MY_USER_NAME",
description: "name of the account",
nullable: FALSE,
updatable: FALSE,
length: {
value: 32
},
type: VARCHAR
}];
Latest Plugin(since 0.4.0), project template will introduce build proto modules only flag.
But if your project already exist please follow this to update to support, as this only some gradle tricky.
open: {PROJECT}/settings.gradle
:
YOUR_PROTO_MODULE
with your proto module;YOUR_APP_MODULE
with your app module;def onlyProto = System.getProperty("onlyProto")?.toString();
if(onlyProto ==null){
onlyProto = System.getenv('onlyProto')?.toString();
}
// If onlyProto property is not set or is not a valid boolean, default to false
// `-DonlyProto=true` to enable this
onlyProto = onlyProto != null ? onlyProto.toBoolean() : false
// Include
include('YOUR_PROTO_MODULE')
if(!onlyProto) {
include('YOUR_APP_MODULE')
}else{
logger.quiet "-DonlyProto=true so no app modules will be included"
}
Then you can use this shell: gradlew clean build -x test -x wireTest -DonlyProto=true
,
to build your proto modules quickly, especially when you has broken update in the proto!