Giter VIP home page Giter VIP logo

osr-common's Introduction

osr-common's People

Contributors

aoboturov avatar gmlewis avatar hannesd avatar jberkel avatar simar0at avatar wetneb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jberkel

osr-common's Issues

Fails to build from source with Java 17 because of illegal escape character

It looks like the code in

utils-parent/utils/src/main/java/de/fau/cs/osr/utils/XmlGrammar.java

line 41

fails with Java 17 because not all unicode slashes are escaped. If I change the code from

"|[\uD800\\uDC00-\uDB7F\uDFFF]" + // #x10000-#xEFFFF

to

"|[\\uD800\\uDC00-\\uDB7F\\uDFFF]" + // #x10000-#xEFFFF

it works for me

Check for license headers at build time

We could check that license headers are present at build time using the license maven plugin.
This check was implemented in the Maven configuration but has not been enforced recently so I have disabled it in #4. It could be added back.

Add continuous integration

It would be nice to have a continuous integration service set up on this repository. That would help us assess pull requests and merge them confidently. It could potentially also deploy a snapshot of the library in the Maven Central snapshot repository, and official releases to the official Maven Central repository.

I have experience with GitHub Actions and could set that up on this repository.

Failing build due to missing license headers

Running mvn install in this repository currently fails because some files are missing a license header.

Small excerpt from the build logs:

 [INFO] Checking licenses...
Warning:  Missing header in: /home/runner/work/sweble-wikitext/sweble-wikitext/tooling/sweble-wikitext/sweble-wom3-parent/pom.xml
Warning:  Missing header in: /home/runner/work/sweble-wikitext/sweble-wikitext/tooling/sweble-wikitext/sweble-wom3-parent/sweble-wom3-swc-adapter/pom.xml

"Comparison method violates its general contract" in VisitorLogic.sweepCache

Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
        at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:744)
        at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:481)
        at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:406)
        at java.util.ComparableTimSort.sort(ComparableTimSort.java:213)
        at java.util.Arrays.sort(Arrays.java:1312)
        at de.fau.cs.osr.utils.visitor.VisitorLogic.sweepCache(VisitorLogic.java:225)
        at de.fau.cs.osr.utils.visitor.VisitorLogic.findVisit(VisitorLogic.java:205)
        at de.fau.cs.osr.utils.visitor.VisitorLogic.resolveAndVisit(VisitorLogic.java:105)

This is caused by multiple threads changing the lastUse while one thread is sorting. The synchronization on sweepCache is not enough to prevent other threads from changing lastUse. It may be enough to just attempt to partially sort the targets to identify the least frequently used, rather than calling Arrays.sort. A quick select strategy may be worth trying. (Note: this bug likely doesn't appear in older Java versions, which did not use TimSort).

A workaround for Java 8 is to do

System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");

Migrated from sweble/sweble-wikitext#49

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.