From e15a50910cb1d0acd299958a2079c729f3f8a7f5 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Mon, 18 Dec 2023 21:01:42 +0800 Subject: [PATCH 1/5] ci(cargo): Add frame pointer support in build flag Signed-off-by: Manjusaka --- .cargo/config | 4 ++++ .github/scripts/behavior_test/plan.py | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 000000000000..eab97dcbf6e3 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,4 @@ +[build] +rustflags = "-C force-frame-pointers=yes -C debuginfo=1" +[unstable] +build-std = ["core", "alloc"] \ No newline at end of file diff --git a/.github/scripts/behavior_test/plan.py b/.github/scripts/behavior_test/plan.py index 5fb0c1bc00ff..3ba3da7aab22 100755 --- a/.github/scripts/behavior_test/plan.py +++ b/.github/scripts/behavior_test/plan.py @@ -126,6 +126,14 @@ def calculate_hint(changed_files: list[str]) -> Hint: hint.binding_python = True hint.binding_nodejs = True hint.all_service = True + if ( + p.startswith(".cargo/") + ): + hint.core = True + hint.binding_java = True + hint.binding_python = True + hint.binding_nodejs = True + hint.all_service = True # language binding affected for language in LANGUAGE_BINDING: From 6f636cb06df023b6cc601335e8aa2c0a6c5c947e Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Mon, 18 Dec 2023 21:11:51 +0800 Subject: [PATCH 2/5] update code Signed-off-by: Manjusaka --- .cargo/config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.cargo/config b/.cargo/config index eab97dcbf6e3..76baf4187f00 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,4 +1,2 @@ [build] -rustflags = "-C force-frame-pointers=yes -C debuginfo=1" -[unstable] -build-std = ["core", "alloc"] \ No newline at end of file +rustflags = "-C force-frame-pointers=yes -C debuginfo=1" \ No newline at end of file From fa7424438911837ee68381177ee5eb866bcab1b8 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 19 Dec 2023 00:20:19 +0800 Subject: [PATCH 3/5] Update code Signed-off-by: Manjusaka --- .cargo/config | 2 -- .github/actions/setup/action.yaml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .cargo/config diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index 76baf4187f00..000000000000 --- a/.cargo/config +++ /dev/null @@ -1,2 +0,0 @@ -[build] -rustflags = "-C force-frame-pointers=yes -C debuginfo=1" \ No newline at end of file diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 72ed77982b65..d8a3fdc23f1d 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -40,7 +40,7 @@ runs: run: | # Disable full debug symbol generation to speed up CI build and keep memory down # "1" means line tables only, which is useful for panic tracebacks. - echo "RUSTFLAGS=-C debuginfo=1" >> $GITHUB_ENV + echo "RUSTFLAGS=-C force-frame-pointers=yes -C debuginfo=1" >> $GITHUB_ENV # Enable backtraces echo "RUST_BACKTRACE=1" >> $GITHUB_ENV # Enable logging From d8651df642e5176f5c2e1229e1b0bc905219c40e Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 19 Dec 2023 00:22:05 +0800 Subject: [PATCH 4/5] Update code Signed-off-by: Manjusaka --- .github/scripts/behavior_test/plan.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/scripts/behavior_test/plan.py b/.github/scripts/behavior_test/plan.py index 3ba3da7aab22..5fb0c1bc00ff 100755 --- a/.github/scripts/behavior_test/plan.py +++ b/.github/scripts/behavior_test/plan.py @@ -126,14 +126,6 @@ def calculate_hint(changed_files: list[str]) -> Hint: hint.binding_python = True hint.binding_nodejs = True hint.all_service = True - if ( - p.startswith(".cargo/") - ): - hint.core = True - hint.binding_java = True - hint.binding_python = True - hint.binding_nodejs = True - hint.all_service = True # language binding affected for language in LANGUAGE_BINDING: From a424470d45baa6f7c773d894aac5a1f39a37b19b Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Tue, 19 Dec 2023 00:30:04 +0800 Subject: [PATCH 5/5] Update --- .github/actions/setup/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index d8a3fdc23f1d..f9937f7ab544 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -40,6 +40,7 @@ runs: run: | # Disable full debug symbol generation to speed up CI build and keep memory down # "1" means line tables only, which is useful for panic tracebacks. + # About `force-frame-pointers`, here's the discussion history: https://github.com/apache/incubator-opendal/issues/3756 echo "RUSTFLAGS=-C force-frame-pointers=yes -C debuginfo=1" >> $GITHUB_ENV # Enable backtraces echo "RUST_BACKTRACE=1" >> $GITHUB_ENV