-
Notifications
You must be signed in to change notification settings - Fork 44
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
variable substitution for depens #317
Comments
no idea if that makes a difference, but we need especially this:
|
I've a similar problem. A solution might be a custom yaml tag. Something like this
These tags should be extendable using the plugin interface. What do you think? Any objections? |
The renaming of dependencies is actually tracked in #314. What would be the purpose of having it extendable via the plugin interface? If we offer string substitution in the rename section you could do something like this: depends:
- name: foo::bar
rename: "$(call-my-plugin)" Actually thinking more about the syntax I would prefer something like this: depends:
- name: "$(call-my-plugin)"
recipe: foo::bar By default the source recipe name equals the desired dependency package name as it is today... |
The usecase I've in mind is to substitute all dependencies from a reference to build a additional depends:
- foo-dev
- bar-dev
- use: []
depends:
- foo-tgt
- bar-tgt
multiPackage:
magic:
depends:
- foo-magic
- bar-magic I'd like to write this: depends: &deps
- foo-dev
- bar-dev
- use: []
depends:
- foo-tgt
- bar-tgt
multiPackage:
magic:
depends:
- !magic_substitution_function_removing_tgt_deps_and_filter_others[*deps,"-dev","-magic"] This way I do not have to have the dependencies list twice. |
Oh, this is then a whole different story. The renaming and variable substitution does not change the number of dependencies. What you want is to have a hook for a plugin to rewrite the dependency list as a whole. (also note that your example would not work because the dependencies were defined already in the common section) I did think about having some template support built into bob to solve the tedious |
Fixed by #510 |
Hi,
feature request: variable substitution for depens area, like:
The text was updated successfully, but these errors were encountered: