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

Catkin plugin: Refactor build. #175

Merged
merged 1 commit into from Dec 19, 2015

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Dec 18, 2015

This PR contains a number of small refactors:

  • Change env() to only contain variables for run-time, and document each of them.
  • Only obtain dependencies upon pull()-- for build() they should just be ready to go.
  • Extract dependency resolution into a standalone function that can be tested in isolation.
  • Change build() to be less clever and more simple/verbose/robust.
  • Add source-space keyword to get rid of custom build().
  • Get unit testing coverage of the Catkin plugin to 100%.

@@ -25,6 +25,9 @@
- catkin-packages:
(list of strings)
List of catkin packages to build.
- source-space:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is source-space the word used upstream, if not, it feels weird. Maybe just workspace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, line 262. Workspace would be confusing since that's what source/source-subdir should be pointing to (the catkin workspace). Catkin has a "build space," a "devel space," an "install space," and a "source space." And a workspace 😛 .

@sergiusens
Copy link
Collaborator

💯 on this, looks really good in the readability domain!

Just had a couple nitpicks here and there.
Nice job on the 100% coverage.

@kyrofa
Copy link
Contributor Author

kyrofa commented Dec 18, 2015

Thanks for the good review @sergiusens! I've pushed a new version that should address your concerns.

@sergiusens
Copy link
Collaborator

Looks good, just adding one more comment about try/except versus checking. Using if here might be better, no functionality is lost so I won't block (another minor one about the testing strategy)

you have my 👍 regardless

@kyrofa
Copy link
Contributor Author

kyrofa commented Dec 19, 2015

@sergiusens Fixed both. You're right, the if probably conveys my intentions better. I'm going to go ahead and merge this, then.

This commit contains a number of small refactors:

- Change env() to only contain variables for run-time, and document
  each of them.
- Only obtain dependencies upon pull()-- for build() they should
  just be ready to go.
- Extract dependency resolution into a standalone function that
  can be tested in isolation.
- Change build() to be less clever and more simple/verbose/robust.
- Add `source-space` keyword to get rid of custom build().
- Get testing coverage to 100%.

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
kyrofa pushed a commit that referenced this pull request Dec 19, 2015
@kyrofa kyrofa merged commit 59434ff into canonical:master Dec 19, 2015
@kyrofa kyrofa deleted the catkin_refactor_build branch December 19, 2015 15:53
smoser pushed a commit to smoser/snapcraft that referenced this pull request Sep 14, 2016
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants