Skip to content

Conversation

soenkeliebau
Copy link
Member

@NickLarsenNZ NickLarsenNZ marked this pull request as draft October 22, 2025 10:28
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

Left some comments.

Comment on lines +46 to +49
crate_description!(),
crate_version!(),
built_info::GIT_VERSION,
built_info::TARGET,
built_info::TARGET_PLATFORM.unwrap_or("unknown target"),
Copy link
Member

Choose a reason for hiding this comment

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

The print_startup_string function is superseded by tracing::info!:

tracing::info!(
built_info.pkg_version = built_info::PKG_VERSION,
built_info.git_version = built_info::GIT_VERSION,
built_info.target = built_info::TARGET,
built_info.built_time_utc = built_info::BUILT_TIME_UTC,
built_info.rustc_version = built_info::RUSTC_VERSION,
"Starting {description}",
description = built_info::PKG_DESCRIPTION
);


#[derive(Parser)]
#[clap(about = built_info::PKG_DESCRIPTION, author = stackable_operator::cli::AUTHOR)]
#[clap(about, author)]
Copy link
Member

Choose a reason for hiding this comment

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

This is already done:


mod built_info {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
pub const TARGET_PLATFORM: Option<&str> = option_env!("TARGET");
Copy link
Member

Choose a reason for hiding this comment

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

built_info seems to already export TARGET. But maybe that's different to what you want here?

See:

use stackable_operator::cli::{Command, ProductOperatorRun};

use clap::Parser;
use clap::{crate_description, crate_version, Parser};
Copy link
Member

Choose a reason for hiding this comment

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

We get this info from built_info. Is there a difference?

Comment on lines +6 to +7
// built's env module depends on a whole bunch of variables that crate2nix doesn't provide
// so we grab the specific env variables that we care about out ourselves instead.
Copy link
Member

Choose a reason for hiding this comment

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

Ohhh. This might make my comments useless. But who knows, maybe it works now?

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.

2 participants