-
Notifications
You must be signed in to change notification settings - Fork 7
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
Merging multiple mixins _packages-skip_ lists #18
Comments
The file containing the paths of both To avoid this limitation the full path of the mixin file could be somehow used to generate unique filenames even if their basenames are the same.
No, at the moment there is no logic merging the content of mixins with the same name. The last one simply overwrite the previous ones. For values of type For some options the order of arguments doesn't make a difference (as in your case |
To avoid the need to make each copied mixin file name unique would it be easier to instead create a single mixin file that contains all of the entries from all the mixin files listed in the index? In regards to the merging and the order that the individual entries are appended to a list, I think it would make sense to honor the order listed in the index.yaml If these feature/changes are acceptable I could try to make them myself I would just need some guidance. |
Since each file is downloaded individually they are also stored individually - a 1-to-1 mapping.
Honoring the ordering in a single index file is an obvious choice. But there are multiple index files and there is no specific order defined between them.
That would be great. I just don't know at the moment how exactly that's should be implemented. |
What I'm saying is that when one calls |
That alone does not solve the ordering problem across indices. The same merge could also be performed on-the-fly when the data is read. The challenge stays the same independent when the merge is being performed. It would be possible to only merge mixins with the same name within the same index (where an order is defined) and keep the existing error message about using only the last if they are defined in different indices. That merging should still happen on-usage time. A pull request for that kind of change would be great to try the idea. |
@dirk-thomas If you (or anyone) could provide some guidance for where it would be right to make that change it really help |
The logic is contained in this repository and the current decision to use only the last key is embedded here: colcon-mixin/colcon_mixin/mixin/__init__.py Line 102 in 3b336dd
To implement the desired logic to allow merging information from the same index (which provides an order) the logic probably has to be refactored in order to allow that kind of context awareness, |
I see, since the value type in the |
@jrgnicho Did you have a chance to look into this? |
@dirk-thomas unfortunately I've been swamped lately and haven't had a change to work on this. However, in this project, I'm using a custom script to more or less create a single mixin file that is then added to colcon. |
I'm trying to configure my colcon workspace to skip packages from two (for now) skip.mixin files in my workspace, the files are as follows:
colcon_ws/src/some_repo1/some_repo1_skip.mixin
colcon_ws/src/some_repo2/some_repo2_skip.mixin
Then I have a workspace level colcon_ws/index.yaml file
Then I add the mixin to the colcon workspace as follows
Then I list the mixin with
colcon mixin list
and get the following warningAnd then when I build with
colcon tries to build the packages in the mixin that was overwritten.
So my question is if there's a way to merge the entries in the packages-skip lists from all of the same mixins that appear in the files listed in the index.yaml file ?
The text was updated successfully, but these errors were encountered: