Skip to content
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

fix: enhance the code reading experience for lacking RPC generated files #353

Merged
merged 4 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0x2f2f2f2f next time u could also modify the CN doc after EN version fixed, and community could enhance it if need (more efficient)

Recommended Way:

  1. If u have GitHub Copilot, it could auto generate it (then we could use suggestion to enhance it if need~
image 2. use GPT/Bing/Google Translate, no need to worry about the accuracy, we can edit directly~

Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,14 @@ curl "http://localhost:8080/graphs/hugegraph/graph/vertices" | gunzip
1. 在 IntelliJ IDEA 的 `Preferences/Settings` 中找到 `Java Compiler` 面板,然后关闭 `--release` 选项 (推荐)
2. 或者将项目的 SDK 版本设置为 8 (Deprecated soon)

#### 2. Log4j2 日志无法打印 %l 等位置信息
#### 2. java: *.store.raft.rpc.RaftRequests does not exist (RPC Generated Files)

原因是源代码没有包含 `RPC-generated` 文件。可以尝试两种方法来解决:
1. [命令] 在根目录下运行 `mvn clean compile -DskipTests` (**推荐**)
2. [UI] 在 IDEA 中,右键点击 `hugegraph` 模块,选择 `Manve -> Generate Sources and Update Folders`


#### 3. Log4j2 日志无法打印 %l 等位置信息

这是因为 Log4j2 中使用了 asynchronous loggers,可以参考[官方文档](https://logging.apache.org/log4j/2.x/manual/layouts.html#LocationInformation)进行配置

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The core steps for local startup are the same as starting with **scripts**:
1. Initialize the database backend by executing the `InitStore` class to initialize the graph.
2. Start HugeGraph-Server by executing the `HugeGraphServer` class to load the initialized graph information and start the server.

Before proceeding with the following process, make sure that you have cloned the source code of HugeGraph
and have configured the development environment, such as `Java 11` & you could config your local environment
with this [config-doc](https://github.com/apache/incubator-hugegraph/wiki/The-style-config-for-HugeGraph-in-IDEA)
Before proceeding with the following process, make sure that you have cloned the source code of HugeGraph
and have configured the development environment, such as `Java 11` & you could config your local environment
with this [config-doc](https://github.com/apache/incubator-hugegraph/wiki/The-style-config-for-HugeGraph-in-IDEA)

```bash
git clone https://github.com/apache/hugegraph.git
Expand Down Expand Up @@ -146,7 +146,13 @@ The reason may be that cross-compilation is triggered when using Java 11 to comp
1. In IntelliJ IDEA, go to `Preferences/Settings` and find the `Java Compiler` panel. Then, disable the `--release` option (recommended).
2. Set the Project SDK to 8 (Deprecated soon).

#### 2. Unable to Print Location Information (%l) in Log4j2
#### 2. java: *.store.raft.rpc.RaftRequests does not exist (RPC Generated Files)

The reason is that the source code didn't include the `RPC-generated` files. You could try 2 ways to fix it:
1. [CMD]`mvn clean compile` in the **root** directory (Recommend)
2. [UI] right click on the `hugegraph` repo and select `Maven->Generate Sources and Update Folders`. This will rebuild the repo and correctly generate the required files.

#### 3. Unable to Print Location Information (%l) in Log4j2

This is because Log4j2 uses asynchronous loggers. You can refer to the [official documentation](https://logging.apache.org/log4j/2.x/manual/layouts.html#LocationInformation) for configuration details.

Expand Down
Loading