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

try to match panda's version to the current rakudo #84

Merged

Conversation

garu
Copy link
Contributor

@garu garu commented Mar 13, 2016

Hi! First of all let me thank you for rakudobrew: it's a great tool and the one thing I missed to start really digging into perl 6!

It got my attention that, when installing panda via build-panda or build panda, rakudobrew was not taking into account whether panda had a matching version for the rakudo it was built for. As a result, it was doing weird things like installing panda HEAD for a very old rakudo build (like pre v6.c).

This is a simple patch that attempts to fix this issue. It works the following way:

If the user has provided a version for panda (e.g. "rakudobrew build-panda 2016.01") then it honors said version and croaks if it can't find it.

However, if the user has NOT provided a version for panda (e.g. "rakudobrew build-panda") then it first tries to checkout a panda version that matches the current rakudo version being used. If it can't find a match, it fallbacks to panda's HEAD (with a mention on the logs). The user can still update its panda by simply doing a "rakudobrew build-panda HEAD".

I think this might help people trying to work with many different rakudo versions. It's specially interesting for Travis-CI, where you can now write on the install section:

rakudobrew build-panda

instead of:

rakudobrew build-panda $([ "$TRAVIS_PERL6_VERSION" == "latest" ] && echo "" || echo $TRAVIS_PERL6_VERSION)

Hope this is helpful! And thanks again for all the great work in rakudobrew :)

Cheers!

@tadzik
Copy link
Owner

tadzik commented Apr 1, 2016

Awesome improvement, thanks a lot, and sorry to neglect this PR for so long :)

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