-
Notifications
You must be signed in to change notification settings - Fork 26
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
variants #158
base: main
Are you sure you want to change the base?
variants #158
Conversation
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.
Thanks for the draft implementation. Based on the doc-comments for the variant
function, I want to ensure the purpose and desired behavior for a --variant
argument.
Variants appear to be used to select different configurations defined in a project's Cargo.toml
file, such as:
[package.metadata.wix]
name = "Parent Name"
[package.metadata.wix.variants.child1]
name = "Child 1 Name"
[package.metadata.wix.variants.child2]
name = "Child 2 Name"
So, if Child 2 Name
is desired for an installer, cargo wix --variant child2
could be used to change the installer name. This does not necessarily select a package within a Workspace project. Variants could potentially be used for this, but variants are independent of the Workspaces.
I am open to adding this feature. It is an elegant idea for addressing multiple configurations. I just want to note this feature would be independently useful for a single package project, not just Workspaces. Also, please be aware, Workspace support is an ongoing discussion, See #74 and #102,
@@ -308,6 +310,16 @@ impl<'a> Builder<'a> { | |||
self | |||
} | |||
|
|||
/// Sets the variant. |
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.
Variants in the cargo-deb project are for defining different configurations of the cargo deb
command within a project's Cargo.toml
file. It is not for selecting a package within a workspace. The doc-comments do not match the intention of variants.
It appears possible to define different installers for different packages within a Workspace using variants, but the argument does not select the specific package.
@cstkingkey Is this still of interest? |
Add option to build variants. inspired by cargo deb.
For now, this is a concept demonstration.