On Mon, Feb 20, 2012 at 10:11 AM, William Stein <wst...@gmail.com> wrote:
> On Mon, Feb 20, 2012 at 10:06 AM, Keshav Kini <keshav.k...@gmail.com> wrote:
>> Robert Bradshaw <rober...@math.washington.edu> writes:
>>> On Mon, Feb 20, 2012 at 1:00 AM, Keshav Kini <keshav.k...@gmail.com> wrote:
>>>> William Stein <wst...@gmail.com> writes:
>>>>> I think the reason I implemented the kludgy "sage -clone" Sage branch
>>>>> thing (way back in maybe March 2006) was because we had no dependency
>>>>> checking for Pyrex files.   Now that we have dependency checking,
>>>>> lightweight branching should be able to accomplish the same thing much
>>>>> more efficiently, right?
>>>>
>>>> I have no idea how Cython works, it all seems like magic to me :) So I
>>>> have no idea whether there's some problem with getting rid of `sage
>>>> -clone`. But even if not, then I think it's Cython which needs to be
>>>> fixed. `sage -clone` should not exist, IMO.
>>>
>>> Cython is just a py(x) to C compiler. The problem is not Cython per
>>> se, but re-building when changing branches. Each "clone" keeps it's
>>> own independent set of build artifacts, so switching between them does
>>> not require a re-build.
>>
>> Sure, that much I certainly understand. I don't know what William is
>> saying about dependency checking, though.
>
> If you switch between git branches all the build artifacts are for the
> branch right
> *before* you did the switch.  It would seem likely this could confuse
> the hell out
> of Pyrex, but maybe not Cython (?).    Even if it doesn't confuse
> them, it can cause
> huge build times -- e.g., each time you switch branches, you might have to 
> wait
> 30 minutes for "sage -br", in case the branches touch something that is 
> depended
> on by a lot of other Cython code.   The Sage version of branches
> completely solves
> this problem.

Yep, that is exactly the issue. Distutils doesn't understand Cython
dependencies, and we have our own custom code to handle that (though
we could move over to Cython's implementation).

And before this we used to have to manually touch dependent .pyx files
or do a "-ba" just to be sure, in the snow, up the hill both ways...

>> Well, on second thought maybe I can guess. Is it that Cython now knows
>> how to check which files have been touched, and then do a cascading
>> rebuild of all outdated .so files? If previously you required a total
>> rebuild every time you ran `sage -b`, I can see why you would want to
>> keep a separate copy of the Sage library which you never ran `sage -b`
>> on.
>
> It's worse in some cases, as mentioned above.   However, for a lot of
> everyday work, there won't be many files that are forced to be rebuilt
> when switching branches.

In particular, when working on coercion (parent.pxd) and more basic
structures (matrix0.pxd) a huge number of files had to be rebuilt. I
think these days a higher percentage of development happens in the
"leaves" so it's not near as painful.

- Robert

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to