[Pharo-dev] Tonel line end convention

Sven Van Caekenberghe sven at stfx.eu
Fri Nov 10 06:39:13 EST 2017



> On 10 Nov 2017, at 12:26, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> 
> 
> 
>> On 10 Nov 2017, at 07:25, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>> 
>> Hi,
>> 
>> I am wondering if the current approach regarding the Tonel line end convention is a good idea.
>> 
>> TonelWriter>>#newLine
>> ^ OSPlatform current lineEnding
>> 
>> Although it is no problem to write Pharo code that transparently deals with (accepts) any line end convention, not specifying a fixed line end convention is bound to lead to version control problems, in my opinion.
>> 
>> Person 1 on platform A has line end convention #cr. After editing a single method, the .class.st is generated. Now the whole file is using #cr. From the standpoint of the version control system, *every* line is now potentially changed (when the previous line end convention was different).
>> 
>> Or am I missing something that mitigates this ?
> 
> git can handle (ignore) line endings when diffing. 
> and also git can checkout with platform line endings, which means you can switch between mac/linux and windows *and* you can keep your files readable (which is the purpose of using platform line ending).

OK, that's settled then ;-)

> Esteban
> 
>> 
>> Sven





More information about the Pharo-dev mailing list