Skip to content

Windows CI Failure #368

@bhargav

Description

@bhargav

The main cause of unit test failures is that System.lineSeparator() is \r\n which is 2 characters instead of the UNIX line separator \n which is a single character.

So, if you create a TextAnnotation in UNIX*, the offset will not match on Windows. (This causes unit tests that try to match character offsets fail). Main usage: https://github.com/IllinoisCogComp/illinois-cogcomp-nlp/blob/master/core-utilities/src/main/java/edu/illinois/cs/cogcomp/annotation/BasicTextAnnotationBuilder.java#L56

One way to fix this is to define a \n as a platform agnostic line separator and use it in all strings that we use. Essentially assuming all edits to data are done on UNIX* systems.

Other option is to force System.lineSeparator() on Windows to \n. This can be done programmatically or through environment variable. https://stackoverflow.com/questions/22681534/java-change-system-new-line-character

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions