Skip to content

Conversation

@qiweiii
Copy link
Contributor

@qiweiii qiweiii commented Aug 23, 2025

Release build with default optimization can pass traces tests by extend lifetime in an ffi call, but other similar code don't have this issue, so this could be a special case.

And testing with release build revealed other differences, for instance sth related to weak var in blockchain services, which seems to have no way to fix. I guess we have to turn off some optimization.

I went through swift optimization levels (-O, -Osize, -Onone), with related flags only (trying all flags will take too long since i did not find the specific sets of optimization flags for each level), and run our test that can fail in default release build

  • -O (performance over code size) does not work no matter which flag is used
  • -Osize (prioritizes code size over perf) does not work no matter which flag is used
  • -Onone(no optimizations) works of course, but can enable some optimization flags after it

tested flags:

  • -disable-actor-data-race-checks
  • -enforce-exclusivity=none
  • -remove-runtime-asserts
  • -disable-dynamic-actor-isolation
  • -strict-concurrency=minimal
  • -whole-module-optimization
  • -no-whole-module-optimization
  • -unavailable-decl-optimization=none
  • -disable-autolinking-runtime-compatibility-concurrency
  • -disable-autolinking-runtime-compatibility-dynamic-replacements
  • -disable-migrator-fixits

Aded ci release tests to prevent unexpected release build bugs in future

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The changes introduce a release build to the CI pipeline and attempt to fix the release build process. However, the implementation has some issues. The CI workflow for release tests is overly complex and skips tests for one package, which is concerning. Additionally, key compiler optimizations have been disabled in the release build configurations, which could significantly degrade performance and should be addressed.

@qiweiii qiweiii linked an issue Aug 23, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.66%. Comparing base (668d64a) to head (34072fb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
- Coverage   81.80%   81.66%   -0.15%     
==========================================
  Files         378      378              
  Lines       33237    33222      -15     
==========================================
- Hits        27191    27132      -59     
- Misses       6046     6090      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qiweiii qiweiii marked this pull request as ready for review August 24, 2025 00:05
@qiweiii
Copy link
Contributor Author

qiweiii commented Aug 24, 2025

may need to update branch protection rule to fix "Expected — Waiting for status to be reported": https://github.com/orgs/community/discussions/26698#discussioncomment-3252954

@xlc xlc merged commit f50cd34 into master Aug 24, 2025
5 of 7 checks passed
@xlc xlc deleted the fix-release-build-issue branch August 24, 2025 23:12
@xlc
Copy link
Member

xlc commented Aug 24, 2025

branch protection rule updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants