colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
103 stars 46 forks source link

Repo Transfer Request: `colcon-clean` #521

Closed ruffsl closed 1 year ago

ruffsl commented 2 years ago

Request Description

I've authored a colcon extension named colcon-clean to introduce a new clean verb to the colcon CLI:

An extension for colcon-core to clean package workspaces. Enables cleaning of various colcon paths, such as build or install folders, for either the entire workspace or for selected packages with advanced path globing options. In conjunction with colcon-package-selection, this extension can help maintain hygienic build environments while leveraging persistent workspaces for caching by allowing users to finely remove stale artifacts, preserving what can be cached during software development. For example, when pulling various changes into a local workspace to review pull requests, this extension can be used to wipe only the build and install paths for affected packages, ensuring subsequent builds are not cross contaminated from previous jobs.

The repo, demo, and talk for this extension can be viewed here:

Could this extension be transferred to the colcon org and be slated for release?

Additional Notes

This relates to some long standing tickets, including:

The extension's release was previously blocked in debian, but has since be resolved:

This extension is already being used in the wild:

cottsay commented 2 years ago

From what I can tell, we will only be able to build a debian for Jammy, which is the only supported Ubuntu version where python3-scantree is released: https://packages.ubuntu.com/search?keywords=python3-scantree&searchon=names&suite=all&section=all

ruffsl commented 2 years ago

Indeed. While I manage to upstream some python dependencies into the recent release of debian, we'd have to packing and host those in the ros apt repo if we'd want to backport these extensions to prior distros. That said, I'm unsure of the colcon version differences between distros, or if there would be any API breaks.

kledom commented 2 years ago

I don't want to sound rude or anything. But are there any plans here for what happens next?

It's hard for me to understand why, after several years of development, colcon still can't have a "clean" command. A feature that at least any other buildtool that I've heard of has. Hopefully, the problem cannot be any dependencies on some python library?

cottsay commented 2 years ago

I started reviewing the extension last week. I'm on vacation for the next week, but I can take a look after that.

You are 100% able to install the extension from pip right now.

kledom commented 2 years ago

Thanks for the update. I know that I can install the extension via pip. Maybe it's just me, but mixing apt-installed packages with pip extensions sounds dangerous to me. Also, I would argue that clean should be a basic feature of colcon and come pre-installed (or at least with colcon-common-extensions). Even if typing some rm command doesn't seem that complicated, clean offers a certain extra comfort.

nuclearsandwich commented 2 years ago

Maybe it's just me

I think that this is part of the equation worth focusing on. Colcon itself, by design is not meant to be a kitchen sink system which builds in everything anyone could possibly want, instead it's built ground up as an extensible system.

To me, colcon is not meant to be "universal" like a black hole absorbing everything in its gravitional pull but universal like interlocking brick toys, allowing its users to build exactly the thing they need for a given situation.

Right now there's no set criteria for what gets included in colcon-common-extensions and I expect it will always be at the discretion of the maintainers of that package, but what you consider essential intersected with what everyone else considers essential would eventually encompass every available colcon extension. If colcon-common-extensions doesn't cover the cases you want, it's entirely possible for you to create your own similar metapackge that includes your preferred colcon extensions. I recognize that right now this is stymied by colcon-clean not yet being published in the colcon apt repositories but this is something that we'll hopefully resolve soon.

ruffsl commented 2 years ago

@cottsay , any remaining topics to review before releasing this extension?

Should I now transfer ownership to the colcon github org?

cottsay commented 2 years ago

This one is good to go. If it won't let you do it, grant me 'owner' on the original repo and I'll transfer it.

cottsay commented 2 years ago

@ruffsl, if you're ready, I'd like to transfer this extension into the colcon org now.

ruffsl commented 2 years ago

@ruffsl, if you're ready, I'd like to transfer this extension into the colcon org now.

Done! If you could add me back to the repo, that'd also cool.

Niknu commented 1 year ago

Is this closed now or not?

cottsay commented 1 year ago

The package still needs to be tagged and released.

ruffsl commented 1 year ago

This package has been released: https://github.com/colcon/colcon-clean/issues/31#issuecomment-1347186325