In a Raku distribution how do I depend on either Foo::Bar
or Foo::Baz
without requiring both?
When the NuGet restore process runs prior to a build, it resolves dependencies first in memory, then writes the resulting graph to a file called project. assets. json . It also writes the resolved dependencies to a lock file named packages.
If you have downloaded a DEB package on your system and want to know which dependencies will be installed along with the package, you can use the -I (capitalized i, not lowercase L) or --info flag with the command.
Dependencies are invitations for other people to break your package. — Josh Ulrich, private communication. Welcome to the seventeenth post in the relentlessly random R ravings series of posts, or R4 for short. Dependencies. A truly loaded topic.
You can use "any": [$dependency-spec1, $dependency-spec2]
. This could look like one of the following (depending on if you use a plain string dependency or a hash):
"depends" : {
"runtime" : {
"any" : [
"Foo::Bar",
"Foo::Baz"
]
}
}
"depends" : {
"runtime" : {
"any" : [
{
"name" : "Foo::Bar"
},
{
"name" : "Foo::Baz"
}
]
}
}
This isn't constrained to raku dependencies either. For instance to declare a dependency on either curl
or wget
one can do:
"depends" : {
"runtime" : {
"any" : [
"curl:from<bin>",
"wget:from<bin>"
]
}
}
which would cause zef install $whatever
to inform the user of the missing programs if none are found.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With