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

replace all (where stuff doesn't break) api with implementation calls #1859

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

maximiliankaul
Copy link
Contributor

@maximiliankaul maximiliankaul commented Nov 20, 2024

  • Why do we need to expose the following dependencies (changing to implementation breaks the build)?
    • ibs.apache.commons.lang3
    • libs.neo4j.ogm.core
  • Can we restrict cpg stuff? Does the cpg-console / neo4 API have to be exposed?

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.13%. Comparing base (66aa2da) to head (8d82ba2).

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

The neo4j and console project are exposed in the cog-all module. Users of that module expect all of the CPG functionality to be available, that includes neo4j and console. It should not be exposed in other modules.

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

If you add implementation(libs.apache.commons.lang3) to every module that uses it, then it does not need to be exposed as api. I will add this to the buildSrc common convention

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

For neo4j it's tricker, it seems we are using a transitive dependency from neo4j (slf4j2) and we did not declare the usage of slf4j2 as a dependency. But we are using slf4j2's Logger as part of our public API, so we should instead specify slf4j2 as public API.

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

Ah, and we have a second problem. We are using neo4j's annotation in our public API, so we need to include at least the annotation package as "api", but not the complete core.

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

Ah, the annotations are part of core, so we are stuck with exposing OGM core

Update: we can try the same "trick" as with apache commons, we can specify it as implementation of all modules. We just need to check if external programs still work

@oxisto
Copy link
Member

oxisto commented Nov 20, 2024

Jackson can also be moved to common

api(libs.apache.commons.lang3)
api(libs.neo4j.ogm.core)
api(libs.jackson)
api(libs.slf4j.api)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably also moved to common dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants