chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.37k stars 467 forks source link

mac: Incremental build fails to run due to API hash mismatch or missing Framework symlinks #3828

Open magreenblatt opened 5 days ago

magreenblatt commented 5 days ago

Describe the bug The CEF sample apps sometimes fail to run when building incrementally after modifying the CEF API. For example, they fail due to API hash mismatches. This can be fixed by manually deleting the .app and .framework artifacts to force a full repackaging of the sample apps. However, this does not recreate the Framework symlinks that exist with a new/clean build (e.g. the symlink from ceftests.app/Contents/Frameworks/Chromium Embedded Framework.framework to ceftests.app/Contents/Frameworks/Chromium Embedded Framework.framework/Versions/A/Chromium Embedded Framework).

To Reproduce Steps to reproduce the behavior:

  1. Create a CEF master build.
  2. Delete out/Debug_GN_x64/*.app and out/Debug_GN_x64/Chromium Embedded Framework.framework directories and rebuild.
  3. Sample apps (cefclient, ceftests, etc) fail to launch.

Expected behavior Sample apps should launch successfully.

Versions (please complete the following information):

magreenblatt commented 5 days ago

The frameworks symlinks are created in //build/config/mac/rules.gni.

magreenblatt commented 5 days ago

Running touch out/Debug_GN_arm64/obj/cef/cef_framework.toc and then rebuilding causes the Framework symlinks to be recreated.

magreenblatt commented 5 days ago

The CEF sample apps sometimes fail to run when building incrementally after modifying the CEF API. For example, they fail due to API hash mismatches.

This causal issue doesn't reproduce consistently (e.g. I can't reproduce it currently just by modifying cef_api_hash.h and rebuilding). I suspect that ninja is occasionally failing to update binaries in the app bundle when the Framework is rebuilt.