sage --dev comment/checkout issues

19 views
Skip to first unread message

John Cremona

unread,
Dec 17, 2013, 4:30:58 AM12/17/13
to sage...@googlegroups.com
I was trying to follow exactly the instruction in the new (draft)
development guide as at http://sagemath.github.io/git-developer-guide/
since obviously what is written there must work. Here are a couple of
things I discovered.

1. My EDITOR environment variable is always set to "emacs -nw" since I
use emacs and don't want to wait for a full X-window to open when I am
connected remotely. This does not work with sage --dev coment: it
raises an error.

1'. From home I reset EDITOR to "emacs" and tried again. I was
running a shell in a tmux window on a server at the university to
which I had logged in from home and recommented to the tmux session.
Nothing happened -- no editor window, and no new prompt, I had to kill
it with Ctrl-C. And when I woke up my office desktop this morning
there was the emacs window patiently waiting.....

I am not suggesting that the dev scripts need do anything about 1'
since it has nothing to do with Sage, just me getting my DISPLAY etc
misconfigured. But if something can go wrong for people in future,
the sooner we see possible problems the better. I definitely think
that 1 should be fixed (though of course meanwhile I can enter
comments on trac as usual).

2. the dev. guide explains how to checkout a new ticket branch in
order to do a review. It does not say how to end this process! Of
course "git checkout master" works, but these instructions are trying
to make it possible for developers to never have to type "git". And I
tried some variations on "./sage --dev checkout master" but they did
not work (error messages about numbers of arguments).

John

Volker Braun

unread,
Dec 17, 2013, 6:17:47 AM12/17/13
to sage...@googlegroups.com
You probably want

    sage -dev checkout --branch master

I, too, implemented the --ticket / --branch switches in the git trac subcommand, but am more and more convinced that it is a huge annoyance. It should just work without having to specify whether the input is a ticket or a branch, that is almost always unambiguous. In other words: DWIM (Do What I Mean), in other words. Also one of the git development tenets.

"sage -dev vanilla" is probably another way to do the same thing. Since we always want at least two equivalent ways to do the same action, right? </irony>

John Cremona

unread,
Dec 17, 2013, 6:51:11 AM12/17/13
to sage...@googlegroups.com
On 17 December 2013 11:17, Volker Braun <vbrau...@gmail.com> wrote:
> You probably want
>
> sage -dev checkout --branch master

Thanks, that works for me. I don't know what I was trying yesterday
which did not work.

>
> I, too, implemented the --ticket / --branch switches in the git trac
> subcommand, but am more and more convinced that it is a huge annoyance. It
> should just work without having to specify whether the input is a ticket or
> a branch, that is almost always unambiguous. In other words: DWIM (Do What I
> Mean), in other words. Also one of the git development tenets.
>
> "sage -dev vanilla" is probably another way to do the same thing. Since we
> always want at least two equivalent ways to do the same action, right?
> </irony>
>

Switching between branches and doing "make" takes a very long time
(quite a long time even using "make -j50"). This is like the old days
under mercurial before queues when we used to create branches using
"sage clone" or something like that.

So I just stupidly tried your suggested "sage -dev checkout --branch
master" after running "make" on a newly checked out ticket branch,
then went back to the ticket branch (ok), and am now having to wait
again for make, which looks as if it is rebuilding the whole Sage
library. Again. Of course, I go to so something else while waiting
for this, which is likely to mean that by the time make has finished I
will have forgotten what the ticket was about.

Is there a way to prevent all this recompilation?

John

PS Time take to run "make" immediately after running "make", and
making absolutely no changes in between:

real 1m11.782s
user 0m51.923s
sys 0m12.209s

Most of this is spent meesing about with the documentation. This is
*not* my idea of how make is supposed to work, and I cannot see myself
managing any useful development at all in future if it will take 1
minute to rebuild after every minor edit. OK, so I see that "./sage
-b" only takes 3-4 seconds after doing noting at all, which is better,
so my mistake was to use make in this context. Something else worth
warning developers about in the manual?
> --
> You received this message because you are subscribed to the Google Groups
> "sage-git" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-git+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Volker Braun

unread,
Dec 17, 2013, 6:59:11 AM12/17/13
to sage...@googlegroups.com
On Tuesday, December 17, 2013 11:51:11 AM UTC, John Cremona wrote:
Switching between branches and doing "make" takes a very long time
(quite a long time even using "make -j50").

If the is not too much difference between the branches then you might get away without "make", just rebuild the Sage library "sage -br". You only have to run make if there is an incompatible change to a spkg in-between the branches. 

Also, even if you have to rebuild you can skip the documentation by running "make build".

Though I agree that the buildsystem needs some work, I mentioned that before. But first we had to switch to git...

Reply all
Reply to author
Forward
0 new messages