Skip to content

Document requries static consequences #237

@koppor

Description

@koppor

(There was a private conversation on this, but I didn't find time to follow-up. This issue is created to be able to reference it that we are aware of the issue)

We "optimized" JabRef's dependencies at JabRef/jabref#15194

We have JBang in use and depend on jablib.jar as SNAPSHOT: https://github.com/JabRef/jabref/blob/d1e11e06cd23808ec16672768de64e93ec80c89c/.jbang/JabLsLauncher.java#L11 . We include the classes required by the JBang "script" directly.

When we modify classes in JabRef, the modified classes are put into the JBang script to check if the script still works. If such a class has @ADR annotation, it fails:

/home/runner/work/jabref/jabref/jablib/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java:31: error: package io.github.adr.linked does not exist
import io.github.adr.linked.ADR;
                           ^
/home/runner/work/jabref/jabref/jablib/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java:195: error: cannot find symbol
    @ADR(49)
     ^
  symbol:   class ADR
  location: class BibEntryWriter

We have a requires static on that dependency:

https://github.com/JabRef/jabref/blob/d1e11e06cd23808ec16672768de64e93ec80c89c/jablib/src/main/java/module-info.java#L265


I think, this is a no-issue as our patch of JBang scripts is just wrong if we don't respect requries static there. It could also be an issue of JBang resolving the build jablib-SNAPSHOT.jar interpreting the requies static wrong in the maven context-

I will close the issue right after submission. I posted it to be able to reference it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions