-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
sage --clone: do not rebuild the entire Sage library, and do not rebuild the docs #13245
Comments
scripts repo |
comment:1
Attachment: trac_13245-clone-docbuild.patch.gz |
comment:2
Attachment: trac_13245-clone-nodocbuild.patch.gz Here is a different patch; this one just turns off docbuilding in |
This comment has been minimized.
This comment has been minimized.
comment:3
Ping. Not directly related, but meanwhile diff --git a/sage-clone b/sage-clone
--- a/sage-clone
+++ b/sage-clone
@@ -53,6 +53,10 @@
cpdir(os.path.abspath('sage/sage'), os.path.abspath(branch + '/sage'))
+if os.path.isfile('sage/.cython_version'):
+ print "Copying over hidden Cython version file..."
+ os.link('sage/.cython_version', branch+'/.cython_version')
+
def copy_dtree(src_dir, dest_dir):
src_root = os.path.abspath(src_dir)
dest_root = os.path.abspath(dest_dir) But there are other issues as well (e.g. rebuilding the |
comment:4
Replying to @nexttime:
Oh, forgot: Cython-generated header files ( if ext in ['.h', '.c', '.cpp']:
if 'Cython' in open(src + '/' + F).readline():
os.link(src + '/' + F, dest + '/' +F)
os.utime(dest + '/' +F, None) (For the moment, we could look for |
This comment has been minimized.
This comment has been minimized.
comment:5
Okay, here is a patch to deal with the |
Attachment: trac_13245-clone-cython.patch.gz |
comment:6
Replying to @jhpalmieri:
Yes, but it also triggers the rebuild of (currently) at least one other Cython module (besides the newly generated five
(I think we could just copy over all files in Note sure what or whether doc-rebuilding is triggered (upon next Could you explain why we "touch" almost all manually copied (more precisely, linked) files?
Does the patch introduce new environment variables? :P [Haven't tried the patches here yet.] |
comment:7
Replying to @nexttime:
Ok, seems like Mercurial is to blame. We could use |
comment:8
Replying to @nexttime:
Or change back the modification times of the files (of the working copy) Mercurial created... ;-) OMG. |
comment:9
Replying to @nexttime:
(How about making this optional?!?) |
comment:10
Since apparently |
comment:11
Given the upcoming transition to git, I don't think it's worth trying to wrestle with Mercurial very much. I don't want to spend much more time on it, anyway. |
comment:12
Replying to @jhpalmieri:
Yes, hopefully. Anyway, the title (and parts of the description) still advertise an option to disable docbuilding, but the currently listed patch just disables it unconditionally. Which way do we want to go? |
comment:13
I think it makes more sense not to build the docs at all. But I don't use |
Reviewer: John Palmieri |
comment:14
I think that rebuilding the files in Meanwhile, the patch attachment: trac_13245-clone-cython.patch seems to fix the main cloning problem. I'm happy with that one. |
Changed author from John Palmieri to John Palmieri, Leif Leonhardy |
comment:15
Adjusting priority to reflect the changed subject. Will try to finally review this asap... |
comment:40
a) I only applied the two patches to the scripts repo, nothing to the main repo (I had just built sage, didn't even start it yet). b) Not 100% but almost since there are far fewer extensions that get rebuilt after pushing/popping the entire combinat queue, and it seemed like the same number of modules after running Did you run
and then
? |
comment:41
Replying to @tscrim:
Not explicitly, since |
comment:42
Just for reference: with Sage 5.10.rc1 (not that the version should matter, as far as I know), I applied the two patches here and did
and it only built 6 Cython files before applying the combinat queue:
|
comment:43
Here's a snippet of what I get -- with no patches applied, double-checking the patches are applied in
I'll upload a full log once it's done. Could it be because I didn't run |
comment:44
Attachment: build_log.txt Here's a log from calling |
comment:45
When I called
So it looks like there is something odd with your system. |
comment:47
P.S.: I also touched some pyx files in the clone, ran |
comment:48
Just to make sure, when you run |
comment:49
So it's probably just something I messed up with my install (my guess by applying the patches and then running |
comment:50
I thinkTM I know what the problem might be, namely the order in which subdirectories of Since the odd addition of Now if these get copied (and touched!) after their corresponding Travis, could you switch back to the main branch, remove the line setting |
comment:51
Doing so right now, although the change seems to have triggered a recompile/recythonizing of the cython files (it might have been a side effect of one of my other tests). However I need to sleep, so I'll finish the test in the morning. Thanks. |
comment:52
Replying to @nexttime:
With def copy_dtree(src_dir, dest_dir):
src_root = os.path.abspath(src_dir)
dest_root = os.path.abspath(dest_dir)
for root, dirs, files in os.walk(src_root):
nroot = dest_root + root[len(src_root):]
for d in dirs:
os.makedirs(nroot+'/'+d)
for f in files:
if os.path.splitext(f)[1] in [".c",".cpp",".o",".so"]: # ADDED
print(" %s" % f) # ADDED
os.link(root+'/'+f,nroot+'/'+f)
os.utime(nroot+'/'+f, None)
sys.stdout.flush(); sys.stderr.flush() # ADDED
print "Copying over build directory..."
copy_dtree('sage/build', branch + '/build')
sys.stdout.flush(); sys.stderr.flush() # ADDED I can at least confirm that for me all |
comment:53
My |
comment:54
Also I only get the rebuilding of the 7 extensions and switch back to main is trivial. |
comment:55
Any progress? Does this still deserve to be a Sage 5.10 blocker? |
comment:56
Replying to @jdemeyer:
At least the And we should really disable (postpone) Cython-generated files "out-of-tree", since this breaks both ([Even] with that, upgrading from beta4+ will still trigger the rebuild of the whole Sage library, but only once.) |
comment:57
Replying to @nexttime:
Inline patch, worth its own (blocker) ticket: diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -537,7 +537,8 @@
ext_modules = cythonize(
ext_modules,
nthreads = int(os.environ.get('SAGE_NUM_THREADS', 0)),
- build_dir = 'build/cythonized',
+ build_dir = None, # Don't "cythonize out-of-tree" (cf. #14570) until
+ # sage-clone and sage-sync-build can deal with that.
force=force)
open(version_file, 'w').write(Cython.__version__) EDIT: Added ticket reference to the patch. |
comment:58
Replying to @jdemeyer:
I was (more or less reluctantly) going to give this positive review, but then Travis discovered that using So I'm happy provided we make this ticket depend on the above patch / its ticket. |
comment:59
Replying to @jdemeyer:
It would be great indeed to have 5.10 ready for the Sage-Combinat days next week! There is a lot of good stuff there. |
comment:60
Replying to @nexttime:
I've now created #14721. |
Changed reviewer from John Palmieri to John Palmieri, Travis Scrimshaw, Leif Leonhardy |
Dependencies: #14721 |
Merged: sage-5.10.rc2 |
With the attached patches,
sage --clone
does no longer rebuild the reference manual,
does no longer unnecessarily rebuild the whole Sage library (just because of a missing Cython version file).
In e.g. the
sage-combinat
script, there are usually so many patches applied in the queue, it makes more sense to (re)build the manual after applying the patches, not before.The unintended rebuild of all extension modules upon cloning is a bug introduced by #13031.
Apply attachment: trac_13245-clone-nodocbuild.patch and attachment: trac_13245-clone-cython.patch.
Depends on #14721
CC: @nthiery @saliola @nexttime @hivert @jdemeyer
Component: scripts
Author: John Palmieri, Leif Leonhardy
Reviewer: John Palmieri, Travis Scrimshaw, Leif Leonhardy
Merged: sage-5.10.rc2
Issue created by migration from https://trac.sagemath.org/ticket/13245
The text was updated successfully, but these errors were encountered: