-
-
Notifications
You must be signed in to change notification settings - Fork 106
feat: Put the debug/release build version into the info #7034
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
Conversation
The deltachat_core_version line in the info will look like: ``` deltachat_core_version=v2.5.0 [debug build] ``` or: ``` deltachat_core_version=v2.5.0 [release build] ```
I'd rather put it into a separate variable, e.g. |
thanks a lot! this is super-helpful, at least on iOS, where the release-or-not-flag is set implicitly using a build-script and some tools. it was not clear to me, that i ran DEBUG core, see - and even if one tracks the path and flags, it is good to have a proof by what core is actually doing if the info is added as an own var or appended to the version, this would not matter to me, it is only about having that info ftr, i tested on iOS, and indeed, it is DEBUG (there was a point that DEBUG rust was unbearable slow wrt key generation, that time we always compiled RELEASE, maybe i had that in mind) ![]() |
I pushed a commit that puts it into a separate variable instead, and edited the PR description accordingly |
Nice!
FTR FTR, these days we solve this by always optimizing dependencies, even in debug builds, because one rarely has to rebuild them, anyways - in Cargo.toml:
|
CI is not finishing because of #7035 |
src/context.rs
Outdated
@@ -333,6 +333,12 @@ impl Default for RunningState { | |||
/// about the context on top of the information here. | |||
pub fn get_info() -> BTreeMap<&'static str, String> { | |||
let mut res = BTreeMap::new(); | |||
|
|||
#[cfg(debug_assertions)] | |||
res.insert("build_profile", "debug".to_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe name it debug_assertions
then? It's possible to define more profiles or disable debug assertions in release.
The info will look like:
or:
I tested that this actually works when compiling on Android.
This is how it looked before the second commit
The deltachat_core_version line in the info will look like:
or:
I tested that this actually works when compiling on Android.