-
Notifications
You must be signed in to change notification settings - Fork 787
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
Rename dev versions #334
Rename dev versions #334
Conversation
if RUBY_BUILD_CACHE_PATH is set, create and maintain a local bare git repository in this location. The name of the git repository is based on the git URL, so it will be shared between branches.
* Decrease likelihood of cache collisions * Avoid file:// urls (and therefore the need to escape)
@sstephenson @jeremy Any reason not to merge this? It looks good to me. |
Feels like the multipass change could be seen through to a cleaner conclusion. Sourcing the build definition twice with a special PASS flag is some indication that the build functions should be broken into smaller parts so the git builds can explicitly fetch then make while the other tarball builds can use a bundled fetch+make. |
I must confess that I don't understand the requirement for a bundled fetch+make. In fact, as an end user, I would argue the opposite: fetch failures are often intermittent and restartable, whereas make failures are less so. I actually find it appealing to have ruby-build first fetch everything it might need before it invests the effort in building, but that might just be me. In any case, a follow-on effort could take this to the logical conclusion, and make sure that all of the built in fetch operations are restartable -- either though the expediency of doing the fetch first to a temporary location and then to move it, or by employing restartable operations. Looking at the specifics of the current build definitions as they exist in my pull request, splitting the I would suggest that the ideal solution would involve treating the build definitions as declarative instead of imperative, and thereby be more a specification of what is desired and less of a prescription as to how to do it. Given the limitations of shell scripts, the current design of build definitions does a wonderful job of giving the appearance of being declarative. That being said, the current implementation is decidedly imperative, which means that any change has the possibility of breaking existing user provided build definitions. If such definitions use the provided primitives like |
Hey Sam. I'm sorry I haven't given this the attention it deserves. You've given me a lot to think about. I promise to have an answer soon. |
Double-sourcing the definition is a smell. Here's what I think we should do:
|
This is another method for fixing issues like rbenv#334 (where the downloaded file is tar.bz2 but we're invoking `tar xzvf`). Instead of relying on tar to do the compression format detection (as I have in the other PR), this commit adds an extra optional argument to install_package for specifying the filename extension. If omitted, 'tar.gz' is assumed. Currently only .tar.gz and .tar.bz2 are supported, but it would be easy to add more -- see the new `extract` function. I prefer this solution because it will work with GNU tar before version 1.15. I'm not sure if bsdtar implementations do the compression format detection that newer GNU ones do, and if they have, how long they've been doing so... I also prefer it because downloaded tarballs are now given the correct file extension (assuming the file definition is correct). So if topaz-dev is downloaded but fails to install, manually debugging is slightly less confusing.
What does this patch do? I'd like to avoid pulling it, if it's not terribly necessary. It adds some complex code. |
I'll describe the root problem to be solved: if I build the HEAD/master version of Ruby 2.1.0 given day, and then repeat that a week or a month later, the results should be two versions of ruby, with distinct names. Another way to describe this: ruby-2.1.0-dev is an inappropriate name for a rbenv version, it isn't precise in that two different machines could have two different versions of ruby by that name. |
Hey @rubys, thanks for your work on this, but I'm dropping it.
|
Address the bulk of what I originally set out to do. See comments on rubys@879e1c5