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

fix: generation of dynamic member function calls with memoization + propagating of impurity information across chained calls #1015

Merged
merged 16 commits into from
Apr 9, 2024

Conversation

WinPlay02
Copy link
Contributor

@WinPlay02 WinPlay02 commented Apr 9, 2024

Closes #1012
closes #1013

Summary of Changes

  • fix generation of dynamic member function calls with memoization
  • fix propagating of impurity information across chained calls
  • added a lot of tests to verify

The new memoized_dynamic_call is introduced + memoized_static_call is used for global and static functions.
Calculating global / static function keys directly in the runner would be a larger refactor and is not implemented here.
As there is no dynamic dispatch / inheritance for global / static functions, this is not (as) important.

As a drive-by-fix, python calls on class members are now properly memoized, including the instance the python call was declared on.

The code is also refactored to be a bit simpler, as the memoized_dynamic_call function defers some of the responsibility to the runner.

Copy link

github-actions bot commented Apr 9, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ MARKDOWN markdown-link-check 1 0 1.79s
✅ REPOSITORY git_diff yes no 0.12s
✅ TYPESCRIPT eslint 2 0 0 4.6s
✅ TYPESCRIPT prettier 2 0 0 1.2s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Apr 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f888027) to head (7e96fea).
Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1015   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           99        99           
  Lines        18891     18915   +24     
  Branches      3879      3885    +6     
=========================================
+ Hits         18891     18915   +24     

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

@WinPlay02 WinPlay02 marked this pull request as ready for review April 9, 2024 01:31
Copy link
Member

@lars-reimann lars-reimann left a comment

Choose a reason for hiding this comment

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

Works very well, thanks a lot.

@lars-reimann lars-reimann merged commit 19015c3 into main Apr 9, 2024
8 checks passed
@lars-reimann lars-reimann deleted the generator-fix-batch branch April 9, 2024 08:34
lars-reimann pushed a commit that referenced this pull request Apr 10, 2024
## [0.11.0](v0.10.0...v0.11.0) (2024-04-10)

### Features

* add `toFloat` methods for `Int` and `String` ([#1018](#1018)) ([55a2050](55a2050))
* fine-grained control over inlay hints for parameter names ([#1016](#1016)) ([2667caf](2667caf))
* messaging service ([#1004](#1004)) ([dcf4ecf](dcf4ecf))
* semantic highlighting of block lambda results ([#1011](#1011)) ([228733c](228733c))
* start runner in language server ([#1006](#1006)) ([ef4bb6f](ef4bb6f))
* stubs for int conversions ([#1008](#1008)) ([b635f5a](b635f5a))
* support relative paths ([#1019](#1019)) ([3d3f28d](3d3f28d))
* trigger EDA tool via code lenses ([#1010](#1010)) ([eb6e4b6](eb6e4b6))

### Bug Fixes

* consumption of source maps ([#1005](#1005)) ([ea3da87](ea3da87))
* disable global EDA panel cache ([#1014](#1014)) ([f888027](f888027)), closes [/github.com//issues/986#issuecomment-2042731653](https://github.com/Safe-DS//github.com/Safe-DS/DSL/issues/986/issues/issuecomment-2042731653)
* generation of dynamic member function calls with memoization + propagating of impurity information across chained calls ([#1015](#1015)) ([19015c3](19015c3)), closes [#1012](#1012) [#1013](#1013)
* only spawn one runner process and shut it down properly ([#1009](#1009)) ([2c72cee](2c72cee))
* show EDA tool for `TaggedTable` and `TimeSeries` ([#1017](#1017)) ([ffae98a](ffae98a))
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
3 participants