-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Don't use TAB characters for indentation #13899
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Attachment: 13899_TAB_sage_root.patch.gz |
Attachment: 13899_TAB_sagelib.patch.gz |
Attachment: 13899_TAB_scripts.patch.gz |
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
comment:4
Patches look sane (yes, I've read the whole Sage library patch!), haven't tried to apply them yet though. Other than removing trailing whitespace (and removing useless backslashes at the end of a few lines), I don't see much value in touching the C/C++ and HTML files. In particular, removing tabs that introduce end-of-line comments (in the C/C++ files) is rather counter-productive. [Instead, it would have been worth to translate the French ones, and especially French error messages... ;-) ] |
comment:5
Not sure whether you planned to add further patches here; just noticed it was still "new". Patches apply to Sage 5.6.beta1, doc builds... (The Sage library patch btw. triggers the rebuild of half of the Sage library.) Haven't reviewed the merger script though. |
Reviewer: Leif Leonhardy |
comment:7
There are actually doctest failures in |
comment:8
The Sage library patch attachment: 13899_doctest.patch needs review. |
comment:9
This patch needs some work. At least you should remove the remaining reference(s?) to |
comment:10
Replying to @kcrisman:
No they don't, but I think links between two different manuals (in this case, from the developer manual to the reference manual) are not supported. |
comment:11
Good point. But in that case should they just be
instead of
or does it just ignore this and not make a link? I'm surprised it doesn't raise an error in building the doc (or does it?). |
Attachment: 13899_doctest.patch.gz |
comment:13
Replying to @kcrisman:
Okay, addressed your comments. New patch ready for review. |
comment:14
The example now using |
comment:15
Otherwise Developer's Guide builds and all of its doctests pass now (still with beta1 though), so positive review again if Karl-Dieter's ok with it, too. |
comment:16
Believe it or not, this does not apply to beta2. The first hunk is now
which is close enough to this patch not to warrant extra intrusion. |
This comment has been minimized.
This comment has been minimized.
comment:17
Attachment: trac_13899-doctest-rebase.patch.gz Patchbot, apply 13899_TAB_sage_root.patch to root, 13899_TAB_sagelib.patch and trac_13899-doctest-rebase.patch to the Sage library, and 13899_TAB_scripts.patch to the scripts repository. I have NOT looked at the other patches, only the doctest fix. I do give positive review to the doctest fix (with my trivial rebase). |
comment:18
Replying to @kcrisman:
Scratch that - I see what happened, Jeroen introduced the problem in his previous patch and then fixed it. Now I have to wait for all those Cython files to rebuild to check how nice the developer guide looks... one moment. |
comment:19
Patchbot, apply 13899_TAB_sage_root.patch to the root repository, 13899_TAB_sagelib.patch and 13899_doctest.patch to the Sage library, and 13899_TAB_scripts.patch to the scripts repository. Okay, Jeroen's doctest patch is fine. Sorry for the confusion. |
Changed reviewer from Leif Leonhardy to Leif Leonhardy, Karl-Dieter Crisman |
This comment has been minimized.
This comment has been minimized.
comment:20
Replying to @kcrisman:
Since leif already reviewed the other patches, I guess this means positive review then. |
Merged: sage-5.6.beta3 |
comment:22
This breaks the collection of 25 patches for IPython 0.13. Hopefully beautifying whitespace at least satisfies your OCD. |
comment:23
Replying to @vbraun:
And Guido van Rossums: http://www.python.org/dev/peps/pep-0008/#indentation |
comment:24
Whew; -1 on massive whitespace changes like this unless they are actual errors because it breaks patches, which can be a lot of work to rebase. I thought we had a whitespace beautifying discussion on sage-devel a while ago and we decided on the strategy of correcting whitespace as it was naturally encountered in code changes. At least, that's what I thought. |
comment:25
I guess it's this that I have the most objection to: "Also, make indentation consistent and/or remove trailing spaces in some places. |
comment:26
Replying to @jasongrout:
Sorry, guys, I guess I should have caught this because I recall that discussion too. (And implemented it or something similar in some cases - see my comment at #13255.) I was just trying to help out with the doctest patch, but somehow didn't really think of the rest as it had been "taken care of", but that's no excuse. |
comment:27
I apologize for the trouble. It's true that I'm usually against there changes, but I somehow thought (apparently a mistake) that this was mostly code which isn't often changed. Jason: which is the patch you're having trouble with rebasing? |
comment:28
Replying to @jdemeyer:
TBH, I was pretty aware of the discussions in the past when reviewing this, but regarding the files touched, didn't expect major breakage -- just like Jereon. So to avoid reopening the lengthy debates of the past, I tried to quickly review it... ;-) [And as mentioned, changing C/C++ and HTML files doesn't make that much sense to me, although those changes probably don't cause the trouble you may have now.] |
comment:29
The big set of patches that caught my attention and made me aware of this ticket was the IPython ticket, #12719, that Volker already rebased (see the comment above by him, which I think shows his frustration with having to rebase things). I wouldn't be surprised if there were lots of other patches affected by some of the whitespace changes. |
comment:30
For the record, I would be +1 on reverting the parts of this patch that are touching lots of files for beauty's sake only (like removing trailing whitespace). Large rebasing of tickets like #12719 could easily introduce subtle code errors, and not forcing those changes should take priority over end-of-line spacing. |
comment:31
Replying to @jasongrout:
Apart from the changes to So it's not a total disaster and it's not contradictory to leif's and my idea that these patches only touch rarely-edited files (except |
comment:32
Replying to @jasongrout:
Just checked, and as far as I can see, the only offending patch here was removing an empty line from a file that #12719 removes in its entirety. So I wouldn't say we broke much here, at least until now... In general, patches IMHO shouldn't touch parts they don't have to (i.e., only doing some reformatting there), which we agreed on IIRC. But in this case, the purpose of the ticket is to remove tabs (and "normalize" code -- once and for all -- hopefully), so it does not touch code it doesn't have to... |
comment:33
Automatically enforcing code style is nice but should only be done though local commit hooks. Having a check in Jeroen's release script is BS, that just adds a completely avoidable multi-week ping-pong game when trying to merge a ticket. In any case this ticket is done so lets leave it at that. But please post to sage-devel next time so we can talk you out of it ;-) |
devel/sage/sage/server/notebook
(Remove old notebook files #11409) are not fixed.sage/graphs/planarity_c
uses a very inconsistent indentation scheme (mixing spaces and TABs and having varying amounts of indentation) is hopeless to easily fix automatically.The release manager script has been updated to check all new patches for added TAB indentation.
Apply:
Component: misc
Author: Jeroen Demeyer
Reviewer: Leif Leonhardy, Karl-Dieter Crisman
Merged: sage-5.6.beta3
Issue created by migration from https://trac.sagemath.org/ticket/13899
The text was updated successfully, but these errors were encountered: