Skip to content
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

Store dependency distances on DependencyDescriptors #172

Merged
merged 1 commit into from
Mar 18, 2019
Merged

Store dependency distances on DependencyDescriptors #172

merged 1 commit into from
Mar 18, 2019

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Mar 14, 2019

Store dependency distances on DependencyDescriptors

The distance measures the smallest number of steps that each recursive dependency is from the package.

Depends on #173
Depends on #174

@cottsay cottsay added the enhancement New feature or request label Mar 14, 2019
@cottsay cottsay self-assigned this Mar 14, 2019
@cottsay cottsay requested a review from dirk-thomas March 14, 2019 05:46
@cottsay cottsay added the review Waiting for review (Kanban column) label Mar 14, 2019
@codecov-io
Copy link

codecov-io commented Mar 14, 2019

Codecov Report

Merging #172 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   77.94%   77.98%   +0.03%     
==========================================
  Files          53       53              
  Lines        3034     3039       +5     
  Branches      507      507              
==========================================
+ Hits         2365     2370       +5     
  Misses        641      641              
  Partials       28       28
Impacted Files Coverage Δ
colcon_core/package_descriptor.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63b0592...8e5b83e. Read the comment docs.

@cottsay
Copy link
Member Author

cottsay commented Mar 14, 2019

Hold off on this - I need to work out an issue.

@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) and removed review Waiting for review (Kanban column) labels Mar 14, 2019
@cottsay
Copy link
Member Author

cottsay commented Mar 14, 2019

Okay, I worked out the kinks. The other two PRs should be reviewed before this one.

@cottsay cottsay added review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 14, 2019
The distance measures the smallest number of steps that each recursive
dependency is from the package.
@dirk-thomas
Copy link
Member

With the patch looking almost ready I was wondering about if it is a good idea to calculate the depth information in colcon-core if only colcon/colcon-package-selection#22 wants to use it. I will need to think about what it would take to push this out into the extension actually needing the information...

@cottsay
Copy link
Member Author

cottsay commented Mar 15, 2019

I'm open to other approaches. This solution should only be adding to the size of the descriptors - it shouldn't be increasing the computational complexity of the topographical ordering algorithm. I changed the algorithm to work in "layers", but it should still be doing the same amount of work.

@dirk-thomas
Copy link
Member

I looked into moving the depth logic into colcon-package-selection (close to where it is actually be used for the new argument). The problem with this is that the extension doesn't know what kind of dependency categories where used when calculating the recursive dependencies. So it can't recreate them there (without that knowledge). So while I am not a big fan of calculating the depth here (since it is only used in one extension in another repo) I don't see a reasonable way to do it differently atm.

@dirk-thomas dirk-thomas merged commit a1361ae into colcon:master Mar 18, 2019
@dirk-thomas dirk-thomas added this to the 0.3.19 milestone Mar 18, 2019
@dirk-thomas dirk-thomas removed the review Waiting for review (Kanban column) label Mar 18, 2019
@cottsay cottsay deleted the dep_distance branch March 18, 2019 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants