Checksum calculations and line ending styles

Hello.


I’ve got a question about how checksum is calculated and line ending styles when liquibase runs on different platforms.


As we all know, MS Windows uses carriage return and line feed ("\r\n") as a line ending and *nix uses just line feed ("\n").


Consider situation.


All my sources are stored in a git repository.


And now I run deployment process on a computer that runs under MS Windows. Everything is ok, deployment finishes ok.

I add some new changesets, rerun deployment, repeat this some times, everything is ok, no problem.

Great.


Tomorrow my boss will appear and say - “Juhan, I think we need to move all continues integration process from your machine to a big server that runs under Linux system”.


What will happened?

When I got sources from the git repository, all the files have windows-style line ending.

But when I got sources from the repository on Linux-based system, all the files will have *nix-style line ending.

And as far as I can understand for each file I will get different checksum because of \n\r and \n difference.


Am I right?

If yes, what can I do to move liquibase process between computers with  different system and have no problem with that?


Thank you.


P.S.

I tried to find the answer in the documentation and through the forum but found nothing.

Liquibase normalizes the line endings and strings before doing the checksum specifically to remove any cross-OS issues, so you should be just fine. It actually parses the XML into the internal changelog object structure and then computes the checksum from a re-serialized, more neutral structure.


Nathan

It has done that for years so don’t know the exact version.

Is there a particular changeSet you are seeing problems with in a recent version?

Nathan

What version of Liquibase addressed this?

The code I’m working on is using version 2.0.5 (pretty old).  I just finished migrating our code to GIT.  When I first tried using the code in Git, the problem showed up.  I’m just going to start use the latest version.