Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing architecture tests #6697

Closed
koppor opened this issue Jul 18, 2020 · 5 comments · Fixed by #6825
Closed

Failing architecture tests #6697

koppor opened this issue Jul 18, 2020 · 5 comments · Fixed by #6825
Labels
type: code-quality Issues related to code or architecture decisions

Comments

@koppor
Copy link
Member

koppor commented Jul 18, 2020

Just as to remind that this is known, but not yet fixed.

We cannot fix it today, but hopefully a PR will come in soon.

Test 10 -- is org.jabref.model independent of org.jabref.logic? FAILED

  org.opentest4j.AssertionFailedError: The following classes are not allowed to depend on org.jabref.logic ==> expected: <[]> but was: <[src/main/java/org/jabref/model/cleanup/NormalizeNewlinesFormatter.java]>
      at [email protected]/org.jabref.architecture.MainArchitectureTests.firstPackageIsIndependentOfSecondPackage(MainArchitectureTests.java:110)
@koppor koppor added the type: code-quality Issues related to code or architecture decisions label Jul 18, 2020
@Siedlerchr
Copy link
Member

It depends on OS.newline which is in logic. Need to move OS to model as well

@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 27, 2020

Argh. It depends on l10n which is also in logic. Should I add an exception for this case?
I know the reason for our architecture, but due to one instanceof check I already had to move OS and NormalizeCleanupFormatter down to model.

Edit// I can get rid of the l10n. It's an internal formatter only

@koppor
Copy link
Member Author

koppor commented Jul 27, 2020

Please try to keep model with inbound dependencies only. This allows for offering JabRef as a programming library.

@koppor
Copy link
Member Author

koppor commented Jul 27, 2020

I tried to dig down the root cause:

Notes

  • public abstract class Formatter { was always in org.jabref.model.cleanup. I always felt is trange that the abstract interface is is model, but the implementation in logic. There is no ADR for this
  • FieldFormatterCleanup seems to be in the model packge sind ages.

@Siedlerchr
Copy link
Member

#6717 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code-quality Issues related to code or architecture decisions
Projects
None yet
3 participants