Line Separator
Hello all,
I am facing a little issue with line separators. I export classes with $SYSTEM.OBJ.Export to the file system, but I'm on a Linux (docker) environment and he uses LF.
Is it somehow possible to change the line separator for the export or in general?
Thanks in advance!
Bests, Matthias
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.1.2 (Build 338U) Tue Apr 12 2022 12:05:33 EDT
Hi there,
Are you using VSCode?
If so, you can convert the EOL for new files you create and ones you edit. On VSCode you can use LF on WIndows too without issues.
Otherwise, after exporting the classes, do the following in terminal
Then import that file and see if this solution broke your code. :)
Hi Stefan,
thanks for your reply. I use VSCode but not my colleagues.
Your solution seems to work, except from one thing.
I use the %Stream.FileBinary class for the destination file.
%Stream.FileCharacter change on linux (!) the line terminator to LF even when I use write instead of writeLine.
Bests, Matthias
What is the actual problem with it?
All export import for the code should work the same no matter of OS.
Hi Dmitry,
I agree with you, but when you export on Windows and Linux (Iris docker) you have different files because of the line terminator.
In fact we use different OS for development/staging, which makes it difficult to compare.
The global "LineTerminator" seem to control it for some Streaming-Classes, but it has no effect to the export.
Check autocrlf setting in git.
Unfortunately we use Subversion
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue