support for inheriting package recepies and improved generated packages#35
Conversation
|
what ?? |
|
Well, we have to pay or make it public... |
|
@ktf, can you review this pull request? It would be nice to have some tests in this pull request to assure that nothing is broken wrt current aliBuild model. We were recently working on exactly the same problem (merging recipes) and @Ni-Langguth has a pull request in making aiming to address this problem. The idea was to use chain defaults using --defaults a::b::c syntax and combine them into one effective definition. You are going beyond that by adding merge_policy, we need to see how to combine that. Also, I added possibility to include yaml nodes from another file, another dimension to look into. |
|
Hey, I've written tests for merging defaults, they are over on my branch here, where we developed the n defaults functions: #29 I am also looking into tests for including yaml files. |
|
I wrote tests on my branch, as I mentioned before. If you could do the same for the changes you have made, that would be great. This branch breaks a bunch of CI tests (not the ones I wrote, tests in Could we also get a follow up on the github CI please @pbuncic ? I have rebased my branch onto this one, there were no conflicts in doing so. Once the tests don't break here anymore, I will rebase again and make sure again that nothing breaks. I hope we can merge then. |
|
@akritkbehera , can you please check why CI tests are failing here. |
|
Yes @smuzaffar |
|
@akritkbehera , I think I have managed to fix the CI tests issue. For CI tests https://github.com/bitsorg/bits/blob/main/tests/test_utilities.py mocks the |
|
@Ni-Langguth , CI tests are failing here due to private repo. Can you run these locally to check if issue is fixed? |
|
@smuzaffar I just tested on my machine. I still see: and These failures are not on the main branch nor on my branch and my branch does not fix them. Do you see them too when you try to run the tests? |
98c967f to
be92c6c
Compare
be92c6c to
1ae6136
Compare
|
@Ni-Langguth , I have fixed the above mentioned errors.
I still get the following errors but these errors are already there for main branch so I do not thing change here is reason for those failures. |
|
I think throwing an error for broken recipes is a good idea, we could add this in another PR, let's get this merged first? I rebased my branch onto this one and can now run the tests as successfully as before. I suggest that we merge this branch into main first (once it is reviewed), then I can rebase my branch onto main once more and merge it as well. Do you want to write tests for your developments so that we don't break them accidentally in the future? |
|
I left a comment about the remaining error on a commit here: b6c13cc |
Added Banners to show configuredDirectory Removed --config=file from being passed on further if config is passed.
Thanks to @akritkbehera , this PR has the following improvements
Variable expansion in resolve_tag:
The following is now supported so we can have numerical version of PKG_VERSION without having to repeat ourself it in tag
Fixed repo directory
There was wrong path being constructed if configuration file is passed which was being interpreted as folder. Previously running bits build demo --config=bits.rc led to a path
repositories/bits.rc/general.bits/defaults-release.sh. Now this resolves torepositories/general.bits/defaults-release.shImproved Generated packages
Search for all generated packages in all repositories and not just the first one
YAML Merge & Inheritance Behavior for Recipes
This PR introduces structured merge and inheritance behavior for YAML-based recipes.
The goal is to enable field-level control with the following policies:
merge: combine fields from parent and child.remove: exclude fields from parent.inherit: forcibly inherit specific fields from parent even if overridden.Base:
general.bits