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

Introducing DynamicType and removing usage of AutoType from python #1668

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Sep 3, 2024

This PR introduces a new Type, the DynamicType. It is needed for programming languages that do not have static typing, such as TypeScript or Python. In these languages, the type is determined at run-time. Therefore, neither of our existing AutoType or UnknownType types completely catch the dynamics.

This PR adds the basic concept of the type itself and uses it very sparsely for function parameters, which previously were of AutoType.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 5 lines in your changes missing coverage. Please review.

Project coverage is 78.50%. Comparing base (5c1d5f0) to head (6c85293).

Files with missing lines Patch % Lines
...ofer/aisec/cpg/graph/statements/ReturnStatement.kt 77.77% 0 Missing and 2 partials ⚠️
...hofer/aisec/cpg/frontends/python/PythonLanguage.kt 33.33% 2 Missing ⚠️
...n/de/fraunhofer/aisec/cpg/passes/SymbolResolver.kt 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...tlin/de/fraunhofer/aisec/cpg/frontends/Language.kt 85.06% <100.00%> (+0.29%) ⬆️
...otlin/de/fraunhofer/aisec/cpg/graph/TypeBuilder.kt 57.50% <100.00%> (+1.08%) ⬆️
...isec/cpg/graph/declarations/FunctionDeclaration.kt 76.54% <100.00%> (-0.57%) ⬇️
...cpg/graph/statements/expressions/CallExpression.kt 74.44% <100.00%> (+2.15%) ⬆️
...in/de/fraunhofer/aisec/cpg/graph/types/AutoType.kt 66.66% <ø> (ø)
...de/fraunhofer/aisec/cpg/graph/types/DynamicType.kt 100.00% <100.00%> (ø)
...e/fraunhofer/aisec/cpg/graph/types/FunctionType.kt 88.00% <100.00%> (+5.64%) ⬆️
...er/aisec/cpg/frontends/python/ExpressionHandler.kt 83.04% <100.00%> (ø)
...sec/cpg/frontends/python/PythonLanguageFrontend.kt 81.20% <100.00%> (ø)
...n/de/fraunhofer/aisec/cpg/passes/SymbolResolver.kt 89.69% <80.00%> (-0.21%) ⬇️
... and 2 more

... and 2 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 changed the title Playing around with a dynamic type Introducing DynamicType Jan 22, 2025
@oxisto oxisto added the publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package label Jan 22, 2025
@oxisto oxisto changed the title Introducing DynamicType Introducing DynamicType and removing usage of AutoType from python Jan 22, 2025
@oxisto oxisto added the python label Jan 22, 2025
@oxisto oxisto marked this pull request as ready for review March 10, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant