Introjucer line endings on osx?

Discuss topics relating to the Introjucer (or Jucer) application

Introjucer line endings on osx?

Postby bdejong » Sun May 13, 2012 3:01 pm

Hey guys/jules,

why does the introducer generate all files with CRLF on osx?
it really makes it a pain with git as I have to end up converting all the generated files to mac format each time the introjucer ran its exports!
should the platform specific line ending be used??

grts,

- bram
bdejong
JUCE UberWeenie
 
Posts: 284
Joined: Wed Sep 28, 2011 1:30 pm

Re: Introjucer line endings on osx?

Postby jules » Sun May 13, 2012 8:12 pm

I have to end up converting all the generated files to mac format


There's not really such a thing as "mac format" any more, and every compiler and editor on OSX works just fine with CRLF! I obviously do a lot of dev on all platforms, and I use CRLF in all my files because it works fine everywhere.
User avatar
jules
Fearless Leader
 
Posts: 17382
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Introjucer line endings on osx?

Postby TheVinn » Sun May 13, 2012 8:28 pm

jules wrote:I use CRLF


Yeah make sure the "carriage" returns all the way to the left before you roll the paper up and type on the next line...

Image
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2990
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Introjucer line endings on osx?

Postby bdejong » Mon May 14, 2012 8:48 am

Hey guys,


may I then ask what git crlf settings you have? The recommended setting is to have LF in the repository and CRLF or LF depending on which platform you check out on.

I.e. on Windows:

git config --global core.autocrlf true
git config --global core.safecrlf true

And on Mac:

git config --global core.autocrlf input
git config --global core.safecrlf true

See (among many others):
http://help.github.com/line-endings/
http://timclem.wordpress.com/2012/03/01 ... your-line/

You probably have core.autocrlf = false, but as far as I read just about everyone recommends NOT doing this.

Or am I missing the obvious?

- Bram
bdejong
JUCE UberWeenie
 
Posts: 284
Joined: Wed Sep 28, 2011 1:30 pm

Re: Introjucer line endings on osx?

Postby jules » Mon May 14, 2012 9:44 am

I have it set to "don't fuck around with the content of my files".

Seriously, if I check a file into GIT, I expect to get the same bytes back out again. Anyone who turns on an option that will silently change the files that it gives you is just asking for trouble.
User avatar
jules
Fearless Leader
 
Posts: 17382
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Introjucer line endings on osx?

Postby bdejong » Mon May 14, 2012 10:21 am

OK, fair enough, but... it would be -I suppose- very easy to in the introjucer generate LF and not CRLF on OSX, right? Or basically use the native endline style on all platforms. For you that wouldn't make a change at all, but for people who do use the git recommended settings it makes a world of difference.

- bram
bdejong
JUCE UberWeenie
 
Posts: 284
Joined: Wed Sep 28, 2011 1:30 pm

Re: Introjucer line endings on osx?

Postby jules » Mon May 14, 2012 11:20 am

it would be -I suppose- very easy to in the introjucer generate LF and not CRLF on OSX, right?


The whole point of the introjucer is that it creates files that you can use in ALL editors and compilers, on all platforms. The best line-ending for achieving that is CRLF, which in my experience works perfectly everywhere.

Personally, I keep all my code in a shared folder which is used by my Windows, OSX and Linux machines. I may run the introjucer in OSX, and then use the resulting project files from Windows. How could that work if the output of the introjucer was dependent on the OS that it was running in?
User avatar
jules
Fearless Leader
 
Posts: 17382
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Introjucer line endings on osx?

Postby bdejong » Mon May 14, 2012 1:17 pm

OK, but that's how you work... By having the possibility to change line-endings (native <-> windows) you support the way anyone works...
I guess it's a feature request and no longer a bug report! :)

- bram
bdejong
JUCE UberWeenie
 
Posts: 284
Joined: Wed Sep 28, 2011 1:30 pm

Re: Introjucer line endings on osx?

Postby jules » Mon May 14, 2012 1:48 pm

I understand, but it goes totally against my design strategy for the introjucer - I've always gone to a lot of effort to ensure that no matter which platform you run it on, the files it generates are always exactly the same.

Can you explain what exactly would go wrong if you turned off this GIT option and just used CRLF on all platforms? Which tool would fail to understand the files? Because I've been building on all these OSes for decades and have never had any line-ending problems. Sounds like this GIT setting is "fixing" problems for you that don't actually exist.
User avatar
jules
Fearless Leader
 
Posts: 17382
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to The Introjucer/Jucer

Who is online

Users browsing this forum: bdejong and 0 guests

cron