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

Merged
merged 7 commits into from
Dec 2, 2024

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.50%. Comparing base (b529b6c) to head (440f80c).
Report is 1 commits behind head on main.

Additional details and impacted files

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

@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

@oxisto oxisto marked this pull request as ready for review December 2, 2024 14:43
@oxisto oxisto enabled auto-merge (squash) December 2, 2024 16:59
@oxisto oxisto merged commit 0281c1e into main Dec 2, 2024
2 checks passed
@oxisto oxisto deleted the mk/buildsystem branch December 2, 2024 17:05
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