-
Notifications
You must be signed in to change notification settings - Fork 35
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
Caching git submodules #20
Comments
Hi @staticfloat!
That sounds very good. You do a great job with the Julia formula 👍
The most difficult part is to tell Julia's Makesystem how to use the libuv and nginx etc. If you need the downloaded tarball, then the openblas formula shows how to do that (I think for a git repo this works, too and points to the temp dir of the checked out sources). Why can't we tell Julia to use the libuv and nginx from main homebrew? I'd love to support you on that one and I will certainly try merge openblas and openblas64 into one formula (where the 64bit interface are named differently). |
For reference, it seems that I will be able to address this with Homebrew/legacy-homebrew#17783 |
How much granularity do you need here? Is it all-or-nothing or are there some submodules that you want checked out? |
All or nothing is what I was planning on. I would disable auto-submodules More granularity would be difficult, I think. -E
|
Okay, good. Yeah, anything more granular is hard to do, the submodule stuff isn't that flexible. |
I merged my patches. This diff against julia.rb will disable submodules: diff --git a/julia.rb b/julia.rb
index 3b8de96..81bdf03 100755
--- a/julia.rb
+++ b/julia.rb
@@ -1,5 +1,8 @@
require 'formula'
+class GitNoSubmoduleDownloadStrategy < GitDownloadStrategy
+ def submodules?; false; end
+end
# Avoid Julia downloading these tools ondemand
# We don't have full formulae for them, as julia makes very specific use of these formulae
@@ -14,7 +17,7 @@ class JuliaDSFMT < Formula
class Julia < Formula
homepage 'http://julialang.org'
- head 'https://github.com/JuliaLang/julia.git'
+ head 'https://github.com/JuliaLang/julia.git', :using => GitNoSubmoduleDownloadStrategy
depends_on "readline"
depends_on "pcre" |
@samueljohn upon further thought, I'm not sure that caching submodules is really what I want to do here. Caching submodules wouldn't achieve much as two of the submodules ( |
@samueljohn, I'm pinging you on this to get your input. I'm going through and cleaning up this formula, and I thought it would be neat to do the same trick with the submodules Julia uses (
libuv
,nginx
, etc....) as you did with the downloaded copy of LAPACK in OpenBLAS; I want to make mini-formulae out of them and have Homebrew control the downloading of them rather than Julia, so that we don't have to re-download the entire git repo every time we update.Do you know if this is possible/easy? If so, could you point me toward how to actually do it? Thanks! I'll incorporate it into this refresh of the formula, which should also address #15, allow us to build both 32-bit and 64-bit versions of Julia, and all her dependencies, and be able to choose Accelerate-backed Julia or OpenBLAS-backed Julia!
The text was updated successfully, but these errors were encountered: