Skip to content
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

[WIP] Implement config v0 -> v1 migration. #1653

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion cargo-dist/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use cargo_dist_schema::{
use serde::{Deserialize, Serialize};

use crate::announce::TagSettings;
use crate::config::v1::DistWorkspaceConfig;
use crate::SortedMap;
use crate::{
errors::{DistError, DistResult},
Expand All @@ -22,7 +23,7 @@ pub mod v0;
pub mod v0_to_v1;
pub mod v1;

pub use v0::{DistMetadata, GenericConfig};
pub use v0::{DistMetadata, GenericConfig, V0WorkspaceConfig};

/// values of the form `permission-name: read`
pub type GithubPermissionMap = SortedMap<String, GithubPermission>;
Expand Down Expand Up @@ -929,6 +930,16 @@ impl std::fmt::Display for ProductionMode {
}
}

pub(crate) fn load_config(dist_manifest_path: &Utf8Path) -> DistResult<DistWorkspaceConfig> {
let src = SourceFile::load_local(dist_manifest_path)?;
parse_config(src)
}

pub(crate) fn parse_config(src: SourceFile) -> DistResult<DistWorkspaceConfig> {
let config: DistWorkspaceConfig = src.deserialize_toml()?;
Ok(config)
}

pub(crate) fn parse_metadata_table_or_manifest(
manifest_path: &Utf8Path,
dist_manifest_path: Option<&Utf8Path>,
Expand All @@ -945,6 +956,15 @@ pub(crate) fn parse_metadata_table_or_manifest(
}
}

pub(crate) fn load_v0_config(dist_manifest_path: &Utf8Path) -> DistResult<V0WorkspaceConfig> {
let src = SourceFile::load_local(dist_manifest_path)?;
parse_v0_config(src)
}

pub(crate) fn parse_v0_config(src: SourceFile) -> DistResult<V0WorkspaceConfig> {
Ok(src.deserialize_toml()?)
}

pub(crate) fn parse_generic_config(src: SourceFile) -> DistResult<DistMetadata> {
let config: GenericConfig = src.deserialize_toml()?;
Ok(config.dist.unwrap_or_default())
Expand Down
13 changes: 13 additions & 0 deletions cargo-dist/src/config/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ use super::*;
use crate::platform::MinGlibcVersion;
use crate::SortedMap;

use crate::config::v1::{WorkspaceTable, PackageTable};

/// A container to assist deserializing the entirety of `dist-workspace.toml`.
#[derive(Debug, Deserialize)]
pub struct V0WorkspaceConfig {
/// the `[workspace]` table.
pub workspace: Option<WorkspaceTable>,
/// the `[package]` table.
pub package: Option<PackageTable>,
/// the `[dist]` table.
pub dist: Option<DistMetadata>,
}

/// A container to assist deserializing metadata from dist(-workspace).tomls
#[derive(Debug, Deserialize)]
pub struct GenericConfig {
Expand Down
72 changes: 72 additions & 0 deletions cargo-dist/src/config/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,78 @@ impl ApplyLayer for AppConfigInheritable {
}
}

/// The internal representation of the [package] table from dist[-workspace].toml.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct PackageTable {
/// The name of the package.
pub name: String,
/// The version of the package. Syntax must be a valid Cargo SemVer Version.
pub version: String,
/// A brief description of the package.
pub description: Option<String>,
/// The authors of the package.
pub authors: Option<Vec<String>>,
/// A URL to the repository hosting this package.
pub repository: Option<String>,
/// A URL to the homepage of the package.
pub homepage: Option<String>,
/// A URL to the documentation of the package.
pub documentation: Option<String>,
/// A relative path to the changelog file for your package.
pub changelog: Option<String>,
/// A relative path to the readme file for your package.
pub readme: Option<String>,
/// The license(s) of your package, in SPDX format.
pub license: Option<String>,
/// Relative paths to the license files for your package.
pub license_files: Option<Vec<String>>,
/// Names of binaries (without the extension) your package is expected
/// to build and distribute.
pub binaries: Option<Vec<String>>,
/// Names of c-style static libraries (without the extension) your
/// package is expected to build and distribute.
pub cstaticlibs: Option<Vec<String>>,
/// Names of c-style dynamic libraries (without the extension) your
/// package is expected to build and distribute.
pub cdylibs: Option<Vec<String>>,
/// A command to run in your package's root directory to build its
/// binaries, cstaticlibs, and cdylibs.
pub build_command: Option<Vec<String>>,
}

/// The internal representation of dist.toml.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct DistConfig {
/// The `[package]` table from dist.toml.
pub package: Option<PackageTable>,
/// The `[dist]` table from dist.toml.
pub dist: TomlLayer,
}

/// The internal representation of the [workspace] table from dist-workspace.toml.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct WorkspaceTable {
/// The various projects/workspaces/packages to be managed by dist.
pub members: Vec<String>,
}

/// The internal representation of dist-workspace.toml.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct DistWorkspaceConfig {
/// The `[workspace]` table.
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace: Option<WorkspaceTable>,
/// The `[dist]` table
pub dist: TomlLayer,
/// The `[package]` table.
#[serde(skip_serializing_if = "Option::is_none")]
pub package: Option<PackageTable>,
}

/// The "raw" input from a toml file containing config
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
Expand Down
4 changes: 4 additions & 0 deletions cargo-dist/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ pub enum DistError {
#[error(transparent)]
TripleError(#[from] cargo_dist_schema::target_lexicon::ParseError),

/// error when using axoasset::toml::to_string() or similar
#[error(transparent)]
AxoassetTomlSerErr(#[from] axoasset::toml::ser::Error),

/// A problem with a jinja template, which is always a dist bug
#[error("Failed to render template")]
#[diagnostic(
Expand Down
138 changes: 60 additions & 78 deletions cargo-dist/src/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use axoasset::{toml_edit, LocalAsset};
use axoasset::{toml, toml_edit, LocalAsset};
use axoproject::{WorkspaceGraph, WorkspaceInfo, WorkspaceKind};
use camino::Utf8PathBuf;
use cargo_dist_schema::TripleNameRef;
Expand All @@ -9,6 +9,7 @@
config::{
self, CiStyle, Config, DistMetadata, HostingStyle, InstallPathStrategy, InstallerStyle,
MacPkgConfig, PublishStyle,
v1::TomlLayer,
},
do_generate,
errors::{DistError, DistResult},
Expand Down Expand Up @@ -155,7 +156,7 @@
}

if root_workspace.kind != WorkspaceKind::Generic
&& root_workspace.manifest_path.file_name() != Some("dist.toml")
|| root_workspace.manifest_path.file_name() != Some("dist.toml")
{
return Ok(());
}
Expand Down Expand Up @@ -199,11 +200,52 @@
Ok(())
}

fn do_migrate_from_v0() -> DistResult<()> {
let workspaces = config::get_project()?;
let root_workspace = workspaces.root_workspace();
let manifest_path = &root_workspace.manifest_path;

if config::load_config(manifest_path).is_ok() {
// We're already on a V1 config, no need to migrate!
return Ok(());
}

// Load in the root workspace toml to edit and write back
let Ok(old_config) = config::load_v0_config(manifest_path) else {
// We don't have a valid v0 _or_ v1 config. No migration can be done.
// It feels weird to return Ok(()) here, but I think it's right?
return Ok(());
};

let Some(dist_metadata) = &old_config.dist else {
// We don't have a valid v0 config. No migration can be done.
return Ok(());
};

let dist = dist_metadata.to_toml_layer(true);

let workspace = old_config.workspace;
let package = None;

let config = config::v1::DistWorkspaceConfig {
dist,
workspace,
package,
};

let workspace_toml_text = toml::to_string(&config)?;

// Write new config file.
axoasset::LocalAsset::write_new(&workspace_toml_text, manifest_path)?;

Ok(())
}

/// Run `dist migrate`
pub fn do_migrate() -> DistResult<()> {
do_migrate_from_rust_workspace()?;
do_migrate_from_dist_toml()?;
//do_migrate_from_v0()?;
do_migrate_from_v0()?;
Ok(())
}

Expand Down Expand Up @@ -301,7 +343,7 @@
// run (potentially interactive) init logic
let meta = get_new_dist_metadata(cfg, args, &workspaces)?;
MultiDistMetadata {
workspace: Some(meta),

Check failure on line 346 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> cargo-dist/src/init.rs:346:29 | 346 | workspace: Some(meta), | ---- ^^^^ expected `DistMetadata`, found `TomlLayer` | | | arguments to this enum variant are incorrect | help: the type constructed contains `config::v1::TomlLayer` due to the type of the argument passed --> cargo-dist/src/init.rs:346:24 | 346 | workspace: Some(meta), | ^^^^^----^ | | | this argument influences the type of `Some` note: tuple variant defined here --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:579:5

Check failure on line 346 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> cargo-dist/src/init.rs:346:29 | 346 | workspace: Some(meta), | ---- ^^^^ expected `DistMetadata`, found `TomlLayer` | | | arguments to this enum variant are incorrect | help: the type constructed contains `config::v1::TomlLayer` due to the type of the argument passed --> cargo-dist/src/init.rs:346:24 | 346 | workspace: Some(meta), | ^^^^^----^ | | | this argument influences the type of `Some` note: tuple variant defined here --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:579:5
packages: SortedMap::new(),
}
};
Expand Down Expand Up @@ -465,87 +507,27 @@
cfg: &Config,
args: &InitArgs,
workspaces: &WorkspaceGraph,
) -> DistResult<DistMetadata> {
) -> DistResult<TomlLayer> {
use dialoguer::{Confirm, Input, MultiSelect};
let root_workspace = workspaces.root_workspace();
let has_config = has_metadata_table(root_workspace);

let mut meta = if has_config {
config::parse_metadata_table_or_manifest(
&root_workspace.manifest_path,
root_workspace.dist_manifest_path.as_deref(),
root_workspace.cargo_metadata_table.as_ref(),
)?
config::load_config(&root_workspace.manifest_path)?.dist
} else {
DistMetadata {
TomlLayer {
// If they init with this version we're gonna try to stick to it!
cargo_dist_version: Some(std::env!("CARGO_PKG_VERSION").parse().unwrap()),
cargo_dist_url_override: None,
// deprecated, default to not emitting it
rust_toolchain_version: None,
ci: None,
installers: None,
install_success_msg: None,
tap: None,
formula: None,
system_dependencies: None,
targets: None,
dist_version: Some(std::env!("CARGO_PKG_VERSION").parse().unwrap()),
dist_url_override: None,
dist: None,
include: None,
auto_includes: None,
windows_archive: None,
unix_archive: None,
npm_scope: None,
npm_package: None,
checksum: None,
precise_builds: None,
merge_tasks: None,
fail_fast: None,
cache_builds: None,
build_local_artifacts: None,
dispatch_releases: None,
release_branch: None,
install_path: None,
features: None,
default_features: None,
all_features: None,
plan_jobs: None,
local_artifacts_jobs: None,
global_artifacts_jobs: None,
source_tarball: None,
host_jobs: None,
publish_jobs: None,
post_announce_jobs: None,
publish_prereleases: None,
force_latest: None,
create_release: None,
github_releases_repo: None,
github_releases_submodule_path: None,
github_release: None,
pr_run_mode: None,
allow_dirty: None,
ssldotcom_windows_sign: None,
macos_sign: None,
github_attestations: None,
msvc_crt_static: None,
hosting: None,
extra_artifacts: None,
github_custom_runners: None,
github_custom_job_permissions: None,
bin_aliases: None,
tag_namespace: None,
install_updater: None,
always_use_latest_updater: None,
display: None,
display_name: None,
package_libraries: None,
install_libraries: None,
github_build_setup: None,
mac_pkg_config: None,
min_glibc_version: None,
cargo_auditable: None,
cargo_cyclonedx: None,
omnibor: None,
targets: None,
artifacts: None,
builds: None,
ci: None,
hosts: None,
installers: None,
publishers: None,
}
};

Expand All @@ -561,12 +543,12 @@
let notice = console::style("⚠️".to_string()).for_stderr().yellow();

if !args.host.is_empty() {
meta.hosting = Some(args.host.clone());

Check failure on line 546 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `hosting` on type `config::v1::TomlLayer`

error[E0609]: no field `hosting` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:546:14 | 546 | meta.hosting = Some(args.host.clone()); | ^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 546 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `hosting` on type `config::v1::TomlLayer`

error[E0609]: no field `hosting` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:546:14 | 546 | meta.hosting = Some(args.host.clone()); | ^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
}

// Set cargo-dist-version
let current_version: Version = std::env!("CARGO_PKG_VERSION").parse().unwrap();
if let Some(desired_version) = &meta.cargo_dist_version {
if let Some(desired_version) = &meta.dist_version {
if desired_version != &current_version && !desired_version.pre.starts_with("github-") {
let default = true;
let prompt = format!(
Expand All @@ -586,7 +568,7 @@
};

if response {
meta.cargo_dist_version = Some(current_version);
meta.dist_version = Some(current_version);
} else {
Err(DistError::NoUpdateVersion {
project_version: desired_version.clone(),
Expand All @@ -596,7 +578,7 @@
}
} else {
// Really not allowed, so just force them onto the current version
meta.cargo_dist_version = Some(current_version);
meta.dist_version = Some(current_version);
}

{
Expand Down Expand Up @@ -661,7 +643,7 @@
// FIXME: when there is more than one option we maybe shouldn't hide this
// once the user has any one enabled, right now it's just annoying to always
// prompt for Github CI support.
if meta.ci.as_deref().unwrap_or_default().is_empty() {

Check failure on line 646 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<CiLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<CiLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:646:16 | 646 | if meta.ci.as_deref().unwrap_or_default().is_empty() { | ^^^^^^^^ | ::: cargo-dist/src/config/v1/ci/mod.rs:28:1 | 28 | pub struct CiLayer { | ------------------ doesn't satisfy `config::v1::ci::CiLayer: lazy_static::__Deref` | = note: the following trait bounds were not satisfied: `config::v1::ci::CiLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 646 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<CiLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<CiLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:646:16 | 646 | if meta.ci.as_deref().unwrap_or_default().is_empty() { | ^^^^^^^^ | ::: cargo-dist/src/config/v1/ci/mod.rs:28:1 | 28 | pub struct CiLayer { | ------------------ doesn't satisfy `config::v1::ci::CiLayer: lazy_static::__Deref` | = note: the following trait bounds were not satisfied: `config::v1::ci::CiLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
// FIXME: when there is more than one option this should be a proper
// multiselect like the installer selector is! For now we do
// most of the multi-select logic and then just give a prompt.
Expand All @@ -675,7 +657,7 @@
let mut default = meta
.ci
.as_ref()
.map(|ci| ci.contains(item))

Check failure on line 660 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no method named `contains` found for reference `&config::v1::ci::CiLayer` in the current scope

error[E0599]: no method named `contains` found for reference `&config::v1::ci::CiLayer` in the current scope --> cargo-dist/src/init.rs:660:30 | 660 | .map(|ci| ci.contains(item)) | ^^^^^^^^ method not found in `&CiLayer` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `contains`, perhaps you need to implement one of them: candidate #1: `bitflags::traits::Flags` candidate #2: `ipnet::ipnet::Contains` candidate #3: `itertools::Itertools` candidate #4: `itertools::Itertools` candidate #5: `itertools::Itertools` candidate #6: `std::ops::RangeBounds`

Check failure on line 660 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no method named `contains` found for reference `&config::v1::ci::CiLayer` in the current scope

error[E0599]: no method named `contains` found for reference `&config::v1::ci::CiLayer` in the current scope --> cargo-dist/src/init.rs:660:30 | 660 | .map(|ci| ci.contains(item)) | ^^^^^^^^ method not found in `&CiLayer` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `contains`, perhaps you need to implement one of them: candidate #1: `bitflags::traits::Flags` candidate #2: `ipnet::ipnet::Contains` candidate #3: `itertools::Itertools` candidate #4: `itertools::Itertools` candidate #5: `itertools::Itertools` candidate #6: `std::ops::RangeBounds`
.unwrap_or(false)
|| cfg.ci.contains(item);

Expand Down Expand Up @@ -717,12 +699,12 @@

// Apply the results
let ci: Vec<_> = selected.into_iter().map(|i| known[i]).collect();
meta.ci = if ci.is_empty() { None } else { Some(ci) };

Check failure on line 702 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> cargo-dist/src/init.rs:702:57 | 702 | meta.ci = if ci.is_empty() { None } else { Some(ci) }; | ---- ^^ expected `CiLayer`, found `Vec<CiStyle>` | | | arguments to this enum variant are incorrect | = note: expected struct `config::v1::ci::CiLayer` found struct `std::vec::Vec<config::CiStyle>` help: the type constructed contains `std::vec::Vec<config::CiStyle>` due to the type of the argument passed --> cargo-dist/src/init.rs:702:52 | 702 | meta.ci = if ci.is_empty() { None } else { Some(ci) }; | ^^^^^--^ | | | this argument influences the type of `Some` note: tuple variant defined here --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:579:5

Check failure on line 702 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

mismatched types

error[E0308]: mismatched types --> cargo-dist/src/init.rs:702:57 | 702 | meta.ci = if ci.is_empty() { None } else { Some(ci) }; | ---- ^^ expected `CiLayer`, found `Vec<CiStyle>` | | | arguments to this enum variant are incorrect | = note: expected struct `config::v1::ci::CiLayer` found struct `std::vec::Vec<config::CiStyle>` help: the type constructed contains `std::vec::Vec<config::CiStyle>` due to the type of the argument passed --> cargo-dist/src/init.rs:702:52 | 702 | meta.ci = if ci.is_empty() { None } else { Some(ci) }; | ^^^^^--^ | | | this argument influences the type of `Some` note: tuple variant defined here --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs:579:5
}

// Enable installer backends (if they have a CI backend that can provide URLs)
// FIXME: "vendored" installers like msi could be enabled without any CI...
let has_ci = meta.ci.as_ref().map(|ci| !ci.is_empty()).unwrap_or(false);

Check failure on line 707 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no method named `is_empty` found for reference `&config::v1::ci::CiLayer` in the current scope

error[E0599]: no method named `is_empty` found for reference `&config::v1::ci::CiLayer` in the current scope --> cargo-dist/src/init.rs:707:48 | 707 | let has_ci = meta.ci.as_ref().map(|ci| !ci.is_empty()).unwrap_or(false); | ^^^^^^^^ method not found in `&CiLayer` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `is_empty`, perhaps you need to implement one of them: candidate #1: `axoasset::toml_edit::TableLike` candidate #2: `bitflags::traits::Flags` candidate #3: `gimli::read::reader::Reader` candidate #4: `nix::NixPath` candidate #5: `similar::DiffableStr` candidate #6: `std::iter::ExactSizeIterator`

Check failure on line 707 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no method named `is_empty` found for reference `&config::v1::ci::CiLayer` in the current scope

error[E0599]: no method named `is_empty` found for reference `&config::v1::ci::CiLayer` in the current scope --> cargo-dist/src/init.rs:707:48 | 707 | let has_ci = meta.ci.as_ref().map(|ci| !ci.is_empty()).unwrap_or(false); | ^^^^^^^^ method not found in `&CiLayer` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `is_empty`, perhaps you need to implement one of them: candidate #1: `axoasset::toml_edit::TableLike` candidate #2: `bitflags::traits::Flags` candidate #3: `gimli::read::reader::Reader` candidate #4: `nix::NixPath` candidate #5: `similar::DiffableStr` candidate #6: `std::iter::ExactSizeIterator`
{
// If they have CI, then they can use fetching installers,
// otherwise they can only do vendored installers.
Expand All @@ -745,7 +727,7 @@
// If they passed it on the CLI, flip it on
let config_had_it = meta
.installers
.as_deref()

Check failure on line 730 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:730:18 | 728 | let config_had_it = meta | _________________________________- 729 | | .installers 730 | | .as_deref() | |_________________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 730 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:730:18 | 728 | let config_had_it = meta | _________________________________- 729 | | .installers 730 | | .as_deref() | |_________________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(item);
let cli_had_it = cfg.installers.contains(item);
Expand Down Expand Up @@ -788,18 +770,18 @@
meta.installers = Some(selected.into_iter().map(|i| known[i]).collect());
}

let mut publish_jobs = orig_meta.publish_jobs.clone().unwrap_or(vec![]);

Check failure on line 773 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `publish_jobs` on type `config::v1::TomlLayer`

error[E0609]: no field `publish_jobs` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:773:38 | 773 | let mut publish_jobs = orig_meta.publish_jobs.clone().unwrap_or(vec![]); | ^^^^^^^^^^^^ unknown field | help: a field with a similar name exists | 773 | let mut publish_jobs = orig_meta.publishers.clone().unwrap_or(vec![]); | ~~~~~~~~~~

Check failure on line 773 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `publish_jobs` on type `config::v1::TomlLayer`

error[E0609]: no field `publish_jobs` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:773:38 | 773 | let mut publish_jobs = orig_meta.publish_jobs.clone().unwrap_or(vec![]); | ^^^^^^^^^^^^ unknown field | help: a field with a similar name exists | 773 | let mut publish_jobs = orig_meta.publishers.clone().unwrap_or(vec![]); | ~~~~~~~~~~

// Special handling of the Homebrew installer
if meta
.installers
.as_deref()

Check failure on line 778 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:778:10 | 776 | if meta | ________- 777 | | .installers 778 | | .as_deref() | |_________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 778 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:778:10 | 776 | if meta | ________- 777 | | .installers 778 | | .as_deref() | |_________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Homebrew)
{
let homebrew_is_new = !orig_meta
.installers
.as_deref()

Check failure on line 784 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:784:14 | 782 | let homebrew_is_new = !orig_meta | ________________________________- 783 | | .installers 784 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 784 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:784:14 | 782 | let homebrew_is_new = !orig_meta | ________________________________- 783 | | .installers 784 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Homebrew);

Expand All @@ -822,9 +804,9 @@
let tap = tap.trim();
if tap.is_empty() {
eprintln!("Homebrew packages will not be automatically published");
meta.tap = None;

Check failure on line 807 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:807:22 | 807 | meta.tap = None; | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 807 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:807:22 | 807 | meta.tap = None; | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
} else {
meta.tap = Some(tap.to_owned());

Check failure on line 809 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:809:22 | 809 | meta.tap = Some(tap.to_owned()); | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 809 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:809:22 | 809 | meta.tap = Some(tap.to_owned()); | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
publish_jobs.push(PublishStyle::Homebrew);

eprintln!("{check} Homebrew package will be published to {tap}");
Expand All @@ -840,11 +822,11 @@
} else {
let homebrew_toggled_off = orig_meta
.installers
.as_deref()

Check failure on line 825 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:825:14 | 823 | let homebrew_toggled_off = orig_meta | ____________________________________- 824 | | .installers 825 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 825 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:825:14 | 823 | let homebrew_toggled_off = orig_meta | ____________________________________- 824 | | .installers 825 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Homebrew);
if homebrew_toggled_off {
meta.tap = None;

Check failure on line 829 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:829:18 | 829 | meta.tap = None; | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 829 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `tap` on type `config::v1::TomlLayer`

error[E0609]: no field `tap` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:829:18 | 829 | meta.tap = None; | ^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
publish_jobs.retain(|job| job != &PublishStyle::Homebrew);
}
}
Expand All @@ -852,14 +834,14 @@
// Special handling of the npm installer
if meta
.installers
.as_deref()

Check failure on line 837 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:837:10 | 835 | if meta | ________- 836 | | .installers 837 | | .as_deref() | |_________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 837 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:837:10 | 835 | if meta | ________- 836 | | .installers 837 | | .as_deref() | |_________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Npm)
{
// If npm is being newly enabled here, prompt for a @scope
let npm_is_new = !orig_meta
.installers
.as_deref()

Check failure on line 844 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:844:14 | 842 | let npm_is_new = !orig_meta | ___________________________- 843 | | .installers 844 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 844 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:844:14 | 842 | let npm_is_new = !orig_meta | ___________________________- 843 | | .installers 844 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Npm);
if npm_is_new {
Expand Down Expand Up @@ -897,9 +879,9 @@
let scope = scope.trim();
if scope.is_empty() {
eprintln!("{check} npm packages will be published globally");
meta.npm_scope = None;

Check failure on line 882 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:882:22 | 882 | meta.npm_scope = None; | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 882 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:882:22 | 882 | meta.npm_scope = None; | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
} else {
meta.npm_scope = Some(scope.to_owned());

Check failure on line 884 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:884:22 | 884 | meta.npm_scope = Some(scope.to_owned()); | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 884 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:884:22 | 884 | meta.npm_scope = Some(scope.to_owned()); | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
eprintln!("{check} npm packages will be published under {scope}");
}
eprintln!();
Expand All @@ -907,25 +889,25 @@
} else {
let npm_toggled_off = orig_meta
.installers
.as_deref()

Check failure on line 892 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:892:14 | 890 | let npm_toggled_off = orig_meta | _______________________________- 891 | | .installers 892 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 892 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:892:14 | 890 | let npm_toggled_off = orig_meta | _______________________________- 891 | | .installers 892 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.contains(&InstallerStyle::Npm);
if npm_toggled_off {
meta.npm_scope = None;

Check failure on line 896 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:896:18 | 896 | meta.npm_scope = None; | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 896 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `npm_scope` on type `config::v1::TomlLayer`

error[E0609]: no field `npm_scope` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:896:18 | 896 | meta.npm_scope = None; | ^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
publish_jobs.retain(|job| job != &PublishStyle::Npm);
}
}

meta.publish_jobs = if publish_jobs.is_empty() {

Check failure on line 901 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `publish_jobs` on type `config::v1::TomlLayer`

error[E0609]: no field `publish_jobs` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:901:10 | 901 | meta.publish_jobs = if publish_jobs.is_empty() { | ^^^^^^^^^^^^ unknown field | help: a field with a similar name exists | 901 | meta.publishers = if publish_jobs.is_empty() { | ~~~~~~~~~~

Check failure on line 901 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `publish_jobs` on type `config::v1::TomlLayer`

error[E0609]: no field `publish_jobs` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:901:10 | 901 | meta.publish_jobs = if publish_jobs.is_empty() { | ^^^^^^^^^^^^ unknown field | help: a field with a similar name exists | 901 | meta.publishers = if publish_jobs.is_empty() { | ~~~~~~~~~~
None
} else {
Some(publish_jobs)
};

if orig_meta.install_updater.is_none()

Check failure on line 907 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `install_updater` on type `config::v1::TomlLayer`

error[E0609]: no field `install_updater` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:907:18 | 907 | if orig_meta.install_updater.is_none() | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 907 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `install_updater` on type `config::v1::TomlLayer`

error[E0609]: no field `install_updater` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:907:18 | 907 | if orig_meta.install_updater.is_none() | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
&& meta
.installers
.as_deref()

Check failure on line 910 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:910:14 | 908 | && meta | ____________- 909 | | .installers 910 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1

Check failure on line 910 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied

error[E0599]: the method `as_deref` exists for enum `Option<InstallerLayer>`, but its trait bounds were not satisfied --> cargo-dist/src/init.rs:910:14 | 908 | && meta | ____________- 909 | | .installers 910 | | .as_deref() | |_____________-^^^^^^^^ | ::: cargo-dist/src/config/v1/installers/mod.rs:70:1 | 70 | pub struct InstallerLayer { | ------------------------- doesn't satisfy `_: __Deref` | = note: the following trait bounds were not satisfied: `config::v1::installers::InstallerLayer: lazy_static::__Deref` note: the trait `lazy_static::__Deref` must be implemented --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/ops/deref.rs:136:1
.unwrap_or_default()
.iter()
.any(|installer| {
Expand All @@ -946,7 +928,7 @@
res
};

meta.install_updater = Some(install_updater);

Check failure on line 931 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `install_updater` on type `config::v1::TomlLayer`

error[E0609]: no field `install_updater` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:931:14 | 931 | meta.install_updater = Some(install_updater); | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others

Check failure on line 931 in cargo-dist/src/init.rs

View workflow job for this annotation

GitHub Actions / clippy

no field `install_updater` on type `config::v1::TomlLayer`

error[E0609]: no field `install_updater` on type `config::v1::TomlLayer` --> cargo-dist/src/init.rs:931:14 | 931 | meta.install_updater = Some(install_updater); | ^^^^^^^^^^^^^^^ unknown field | = note: available fields are: `dist_version`, `dist_url_override`, `dist`, `allow_dirty`, `targets` ... and 6 others
}

Ok(meta)
Expand Down
Loading