[Newbies] Re: LFs in method source, Mantis #3766

Jerome Peace peace_the_dreamer at yahoo.com
Sun Dec 14 23:43:26 UTC 2008


[Newbies] LFs in method source, Mantis #3766
tjohnson at iwu.edu tjohnson at iwu.edu
>Sun Dec 14 03:02:30 UTC 2008

>Hi,
>
>I know that this issue is hardly important, except the perfectionist in me keeps making me 
>want to go through these methods and remove all the LFs.  Certainly there is a better way to 
>deal with this problem.  :)

This has proven to be one of those worthy problems that proves its worth by fighting back.

Squeak is cross-platform. Different platforms (windows, linuxes, and macs) each have a different preference for line endings. Few programmers know there even is a distinction to be made. 
Indeed the lf's showing up as square boxes were an attempt to bring awareness to the distinction so it could be addressed.

In that, it is successful as your note points out.

The two pieces of the cure would be to
1) Reformat the sources and changes files.
There is one source file per version (plus 3.9 sources). It would be confusing to change old sources. I believe the release team for 3.9 made an attempt to clean up sources at that point.

2) Prevent or cause to be reformated any code submissions with the wrong line endings. This would be problematical because submitters are usually not aware that they are not submitting properly line-ended code. And in the scheme of things release teams/harvesters are not in a mood to pay attentions to this level of annoyance.

So this remains a low level annoyance not because it could not be addressed but because no way of addressing it is simple enough to justify the effort for this low priority of problem. (And as I said the problem of tends to reoccur as new fixes are proposed and adopted.)

It would not be bad to have a test that if passed would assure that all line endings in source and change text were normal. That would be the first step.

The workaround would be to let the image stop showing the distinction via the square box. This would not solve the problem but it would lessen the annoyances. Lessening the annoyance would prolong the problem unless the sunit test above is created first. Hmmm.




>
>Mantis #3766 says that all LFs were removed from method sources as of version 3.9.  But 
>how come when I am browsing many methods in 3.10.2, in standard source view, 
>(Time>>#print24, for example), LFs still show up as little empty boxes?  When pretty-
>printing or color-printing they are not shown. 

Those two recreate the method from its compilation. They supply line endings
of a more standard nature.


> But shouldn't these LFs be gone after this fix 
>was applied?  I have not tried re-applying the fix.  
>
The fix would consist of cleaning up the sources and changes text file and releasing new ones. It would also require rejecting new source with the lf problem until those sources were reformatted. This would be a good fix to batch with a clean up of the use of _ for assignment since that also requires a simple(?) reformatting of code.

>Could something have happened between 3.9 and 3.10, possibly involving Mantis #6173, in 
>which certain files may have been re-loaded into the image, and correct line-end conversion 
>not done?
>
>Thanks,
>TimJ
>



      


More information about the Beginners mailing list