Milestone/Milestone-20240510

Milestone

Milestone 2024-05-10

Upgrade notes for the 0.4.0 plugin and 0.9.8+ SDK changes that prepared the 1.0.0 release line.

This milestone introduced compatibility changes. Review the migration steps before upgrading older projects.

What Changed

This release prepared the later 1.0.0-RELEASE line and introduced several breaking naming and generation updates.

The most important one was the move from cn_message to message2 for second-language descriptions.

Rename cn_message to message2

The old constant option:

Protobuf
string cn_message = 3 [deprecated = true];

was replaced by:

Protobuf
string message2 = 4;

The intent is to make the second-language field generic instead of hard-coding it to Chinese.

Migration Steps

Prepare

  1. Upgrade the IntelliJ plugin to 0.4.0+.
  2. Upgrade the SDK to 0.9.8-RELEASE or later.
  3. Update {PROJECT}/gradle/libs.versions.toml:
Toml
apihug = "0.9.8-RELEASE"

Update Existing Code

  1. Reload the Gradle project.
  2. Replace enum and error usages of descriptionZhCN with description2 or setDescription2.
  3. Replace cn_message with message2 in proto files.
  4. Rebuild after errors are cleared.

Entity Column Name Strategy

This milestone also introduced more explicit entity column naming controls in hope-wire.json:

JSON
{
  "persistence": {
    "identifyType": "LONG",
    "tenantType": "LONG",
    "format": "CAMEL",
    "upper": "UPPER"
  }
}

Example column option syntax should use the current scalar style:

Protobuf
string user_name = 1 [(hope.persistence.column) = {
  name: "MY_USER_NAME",
  description: "name of the account",
  nullable: false,
  updatable: false,
  length: 32,
  type: VARCHAR
}];

Proto-Only Build Support

The plugin template also introduced a proto-only build switch for faster recovery when a proto update temporarily breaks the full project.

Example invocation:

Terminal
gradlew clean build -x test -x wireTest -DonlyProto=true

Result

After this migration, older projects align with the naming and build conventions that later releases assume by default.

Copyright © 2026 ApiHug·AI-native Enterprise Architecture Factory