chromebrew icon indicating copy to clipboard operation
chromebrew copied to clipboard

Package functions: a framework for making package building a whole lot simpler

Open saltedcoffii opened this issue 3 years ago • 10 comments

We repeat a LOT of code in our package files. Many are identical past their headers. This aims to add a simple way to simplify and DRY a lot of our code in package files. This should also help reduce lots of typing, especially for Python packages. It also builds in an extensible way to configure how the framework interacts with the package file through called functions. Naturally this won't work with every package.

I know this is very novel, so let me know what you think! Ideas and improvements very welcome.

saltedcoffii avatar Oct 17 '21 00:10 saltedcoffii

I really like this!

satmandu avatar Oct 17 '21 02:10 satmandu

Seems like we all like the idea. I'll revert the examples to their original forms since I would like to get this PR through tonight so I can incorporate it into tomorrow's work.

saltedcoffii avatar Oct 17 '21 02:10 saltedcoffii

@uberhacker merge?

saltedcoffii avatar Oct 17 '21 02:10 saltedcoffii

I guess a good way to test this is to build some binaries. Has this been attempted yet?

uberhacker avatar Oct 17 '21 05:10 uberhacker

My brain is tired at the moment, but I'm all about using functions.

To test this, I think this should work:

CREW_TESTING_REPO=https://github.com/saltedcoffii/chromebrew.git CREW_TESTING_BRANCH=package-functions CREW_TESTING=1 crew update

Followed by an attempt at building something...

satmandu avatar Nov 19 '21 02:11 satmandu

Looks like there are still some problems?

image

satmandu avatar Nov 19 '21 02:11 satmandu

@saltedcoffii: Merge conflicts.

uberhacker avatar Jun 01 '22 05:06 uberhacker

@saltedcoffii: Merge conflicts.

@uberhacker is this package ready for merge? if it is yes I'll definitely take care of merge conflicts

saltedcoffii avatar Jun 01 '22 05:06 saltedcoffii

It's fine to fix the conflicts now. I can add the arm binaries once resolved.

uberhacker avatar Jun 01 '22 05:06 uberhacker

@uberhacker ffc173f :)

saltedcoffii avatar Jun 01 '22 18:06 saltedcoffii

Given that a new hacktoberfest has rolled around, maybe it's time to dust off this PR, resolve the outstanding conversations and give this one last look before merge?

Also instead of merge commits can you please rebase the CI dosen't run unless a branch is rebased ontop of master to the point where the CI works (i.e. the Fix CI commit).

Also, merge commits are ugly, imo. (And fix commits, no need to bulk out the log with a bunch of typo and lint fixes)

Zopolis4 avatar Oct 03 '22 09:10 Zopolis4

Given that a new hacktoberfest has rolled around, maybe it's time to dust off this PR, resolve the outstanding conversations and give this one last look before merge?

Also instead of merge commits can you please rebase the CI dosen't run unless a branch is rebased ontop of master to the point where the CI works (i.e. the Fix CI commit).

Also, merge commits are ugly, imo. (And fix commits, no need to bulk out the log with a bunch of typo and lint fixes)

I am totally in support of that! unfortunately, i'm a full time med student so I can't help much :( Anyway it warms my heart how much you guys work on chromebrew, and who knows maybe i'll come back to help update packages and what not on my breaks.

saltedcoffii avatar Oct 14 '22 10:10 saltedcoffii

Superseded by merged https://github.com/chromebrew/chromebrew/pull/8401 Thanks for getting this started @saltedcoffii !

satmandu avatar Jun 22 '23 22:06 satmandu