[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [sage-devel] Re: git Robert Bradshaw Mon Feb 20 15:00:10 2012

On Mon, Feb 20, 2012 at 10:11 AM, William Stein <[EMAIL PROTECTED]> wrote:
> On Mon, Feb 20, 2012 at 10:06 AM, Keshav Kini <[EMAIL PROTECTED]> wrote:
>> Robert Bradshaw <[EMAIL PROTECTED]> writes:
>>> On Mon, Feb 20, 2012 at 1:00 AM, Keshav Kini <[EMAIL PROTECTED]> wrote:
>>>> William Stein <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
To unsubscribe from this group, send an email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org