Giter Site home page Giter Site logo

Comments (10)

mtf90 avatar mtf90 commented on August 24, 2024

From the looks of your terminal output, the difference seems to be quite subtle. It could the handling of newlines (\r\n vs \n) on Windows or do you have any special language configured?

Could you maybe try to debug the DOTSerializationTest, and tell me what the actual difference between the two values is right before the violating check? (Any IDE with TestNG support should be able to this).

from automatalib.

omarzd avatar omarzd commented on August 24, 2024

You're absolutely right.
dotWriter.toString() has \n.
expectedWriter.toString() has \r\n.
How do I fix this?

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

Great, thanks for the info. We will look into this. At this point I'm not sure yet, if this is an issue with the test or the way, the serializer works.

For now, if you're just interested in building the latest AutomataLib artifacts, you could run mvn clean install -DskipTests or use the public snapshot artifacts

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

@omarzd, could you maybe try to build https://github.com/mtf90/automatalib/tree/platformFixes? If this works for you, I can merge the changes in the main repo.

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

@omarzd did you have the chance to test my branch?

from automatalib.

omarzd avatar omarzd commented on August 24, 2024

@mtf90 I just did. It gives the same error.

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

@omarzd Hm, that is weird. I set up AppVeyor to have continuous integration on Windows platforms and merged the changes from my branch. As you can see, the build succeeds.

However, I did have to enable git's autocrlf (so that the test files committed with \n are checked out with \r\n newlines). I assume you use the same configuration, because in your initial feedback you said, that the expectedWriter (which is reading the file) contained \r\n. Do the test files (e.g. serialization/dot/src/test/resources/graph.dot) have correct newlines if you open them in an arbitrary editor?

from automatalib.

omarzd avatar omarzd commented on August 24, 2024

@mtf90 It looks like you merged the fix. I just set my git using git config --global core.autocrlf true and compiled again and it passed the tests. Maybe the git config should be mentioned in the README.
Thank you

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

@omarzd You haven't configured anything similar before? This makes me wonder how you ended up with \r\n newlines in the first place (see your comment), because we mainly use UNIX systems for development (which only use \n).

Anyway, it looks like everything is working out now. Thanks for raising this issue and reminding us to share more love for windows users :P.

Edit: Also, you probably don't have to set this as a global setting, which may interfere with other projects of yours. Apparently, we can also solve this by adding a .gitattributes file to the repository, so that we can provide a proper out-of-the-box configuration. I'll have a look at that.

from automatalib.

mtf90 avatar mtf90 commented on August 24, 2024

@omarzd 3c1a0c5 added a .gitattributes file which should automatically take care of correct, platform dependent newlines conversion, so you shouldn't need to manually configure anything for Automatalib. Although AppVeyor VMs still seem to require manual configuration via core.autocrlf, I checked at least one Windows box where everything worked out-of-the-box.

from automatalib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.