Lazy init addition to manual, HELP_ALL changed to fixed-length static array

This commit is contained in:
Xavier Moffett 2024-04-30 20:05:27 -04:00
parent 0cf3701fe9
commit c243d528b1
Signed by: Sapphirus
GPG Key ID: A6C061B2CEA1A7AC
2 changed files with 24 additions and 20 deletions

View File

@ -18,7 +18,6 @@
*/
use indexmap::IndexSet;
use lazy_static::lazy_static;
use std::fmt::{Display, Formatter, Result as FmtResult};
use pacwrap_core::{
@ -32,28 +31,25 @@ use pacwrap_core::{
mod config;
mod manual;
pub mod version;
mod version;
pub use version::print_version;
lazy_static! {
static ref HELP_ALL: Vec<HelpTopic> = [
HelpTopic::Execute,
HelpTopic::Sync,
HelpTopic::Remove,
HelpTopic::Compose,
HelpTopic::Query,
HelpTopic::Process,
HelpTopic::List,
HelpTopic::Utils,
HelpTopic::Version,
HelpTopic::Help,
HelpTopic::Env,
HelpTopic::Authors,
HelpTopic::License,
]
.into();
}
static HELP_ALL: [HelpTopic; 13] = [
HelpTopic::Execute,
HelpTopic::Sync,
HelpTopic::Remove,
HelpTopic::Compose,
HelpTopic::Query,
HelpTopic::Process,
HelpTopic::List,
HelpTopic::Utils,
HelpTopic::Version,
HelpTopic::Help,
HelpTopic::Env,
HelpTopic::Authors,
HelpTopic::License,
];
#[derive(Debug)]
enum ErrorKind {

View File

@ -213,6 +213,10 @@ pub fn sync(buf: &mut String, layout: &HelpLayout) -> Result {
{tab}{tab}Perform a dryrun operation on existing containers to preview changes applicable or otherwise specified.
{tab}{tab}Only applicable to pre-existing targets and not create operations.
{sub_bold}-l, --lazy-load{reset_bold}
{tab}{tab}Enable lazy-database initialization for this transaction. {bold}NOTE{reset_bold}: This feature is experimental.
{tab}{tab}Edge cases exist wherein the use of {bold}`--force-foreign`{reset_bold} may be required.
{sub_bold}--force-foreign{reset_bold}
{tab}{tab}Force synchronization of foreign packages on resident container. Useful for when installing
{tab}{tab}a new package in an aggregate container without all the prerequisite foreign dependencies
@ -334,6 +338,10 @@ pub fn compose(buf: &mut String, layout: &HelpLayout) -> Result {
{tab}{tab}Queues all available, existing containers for composition. All pre-existing container roots
{tab}{tab}will be deleted and composited from the available configuration data enumerated.
{sub_bold}-l, --lazy-load{reset_bold}
{tab}{tab}Enable lazy-database initialization for this transaction. {bold}NOTE{reset_bold}: This feature is experimental.
{tab}{tab}Edge cases exist wherein the use of {bold}`--force-foreign`{reset_bold} may be required.
{sub_bold}--from-config{reset_bold}
{tab}{tab}Instruct pacwrap to populate configuration data from uninitialized containers. Under normal
{tab}{tab}circumstances, configuration data will only be populated from containers with configuration