Skip to content
New issue

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

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

Already on GitHub? # to your account

Initial work on moving creation of language to translation manager #2110

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Mar 7, 2025

This PR is the start of the epic #2108. The first step is that we need to create our Language node in the translation manager (or in this case the translation context) instead of the config, so we can already set the correct context.

@oxisto oxisto linked an issue Mar 7, 2025 that may be closed by this pull request
@oxisto oxisto added this to the 10.x milestone Mar 7, 2025
@oxisto oxisto force-pushed the instantiate-language-in-translation-manager branch from d92daf8 to 7f3490b Compare March 7, 2025 09:22
@oxisto oxisto marked this pull request as ready for review March 7, 2025 09:26
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 83.69565% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (ce11e81) to head (b7ebf8d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/fraunhofer/aisec/cpg/TranslationConfiguration.kt 62.50% 4 Missing and 2 partials ⚠️
...tlin/de/fraunhofer/aisec/cpg/TranslationContext.kt 81.25% 1 Missing and 2 partials ⚠️
...tlin/de/fraunhofer/aisec/cpg/TranslationManager.kt 77.77% 0 Missing and 2 partials ⚠️
...tlin/de/fraunhofer/aisec/cpg/frontends/Language.kt 83.33% 0 Missing and 1 partial ⚠️
...aisec/cpg/frontends/java/JavaCallResolverHelper.kt 50.00% 0 Missing and 1 partial ⚠️
...ec/cpg/passes/JavaExternalTypeHierarchyResolver.kt 0.00% 0 Missing and 1 partial ⚠️
...ofer/aisec/cpg/passes/PythonAddDeclarationsPass.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...fraunhofer/aisec/cpg/frontends/LanguageFrontend.kt 70.58% <100.00%> (ø)
.../de/fraunhofer/aisec/cpg/frontends/TestLanguage.kt 84.61% <100.00%> (+4.05%) ⬆️
...de/fraunhofer/aisec/cpg/frontends/cxx/CLanguage.kt 96.00% <100.00%> (ø)
.../fraunhofer/aisec/cpg/frontends/cxx/CPPLanguage.kt 93.15% <100.00%> (ø)
...fer/aisec/cpg/frontends/cxx/CXXLanguageFrontend.kt 77.65% <100.00%> (ø)
...raunhofer/aisec/cpg/frontends/golang/GoLanguage.kt 79.56% <100.00%> (ø)
...r/aisec/cpg/frontends/golang/GoLanguageFrontend.kt 92.55% <100.00%> (ø)
...tlin/de/fraunhofer/aisec/cpg/passes/GoExtraPass.kt 81.98% <100.00%> (ø)
...unhofer/aisec/cpg/frontends/ini/IniFileFrontend.kt 77.27% <100.00%> (ø)
...unhofer/aisec/cpg/frontends/ini/IniFileLanguage.kt 100.00% <100.00%> (ø)
... and 20 more

... and 4 files with indirect coverage changes

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oxisto oxisto force-pushed the instantiate-language-in-translation-manager branch from 7f3490b to 07d2b30 Compare March 7, 2025 19:22
Copy link
Collaborator

@konradweiss konradweiss left a comment

Choose a reason for hiding this comment

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

LGTM, I can imagine though that we have to be careful with the EmptyTranslationContext, and for the Language holding it not being used.

@oxisto
Copy link
Member Author

oxisto commented Mar 10, 2025

LGTM, I can imagine though that we have to be careful with the EmptyTranslationContext, and for the Language holding it not being used.

Yes the EmptyTranslationContext is a ugly workaround that is hopefully gone once the ctx stuff is fully implemented.

@oxisto oxisto force-pushed the instantiate-language-in-translation-manager branch from 07d2b30 to b7ebf8d Compare March 10, 2025 13:20
@oxisto oxisto enabled auto-merge (squash) March 10, 2025 13:34
@oxisto oxisto merged commit 5c1d5f0 into main Mar 10, 2025
4 checks passed
@oxisto oxisto deleted the instantiate-language-in-translation-manager branch March 10, 2025 13:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create language node in translation manager
3 participants