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

[move-compiler-v2] clean up a few remaining issues in lambda parser/front-end code #15365

Open
wants to merge 1 commit into
base: 09-27-add_parser_code_for_lambda_types
Choose a base branch
from

Conversation

brmataptos
Copy link
Contributor

@brmataptos brmataptos commented Nov 22, 2024

Description

Various fixes:

How Has This Been Tested?

Usual tests run, showing unchanged behavior on existing code. Tests under /lambda/ without .lambda. config show proper errors generated if to many functions are used. _ok tests now show code working up until "not implemented" errors.

Key Areas to Review

Most complex stuff is in previous PR, but:

  • Am I missing some ability cases (e.g., filtering for store and copy properties in captured free variables?
  • Are closures with references getting through?
  • Do /lambda/storage/*_ok.move tests look like reasonable code to expect from users?

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Nov 22, 2024

⏱️ 31m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-move-tests 12m 🟥
rust-move-tests 12m 🟥
rust-cargo-deny 4m 🟩🟩
check-dynamic-deps 1m 🟩🟩
general-lints 54s 🟩🟩
semgrep/ci 48s 🟩🟩
file_change_determinator 22s 🟩🟩
permission-check 13s 🟩🟩
permission-check 6s 🟩🟩
check-branch-prefix 1s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link
Contributor Author

@brmataptos brmataptos changed the title lambda-compiler-completion [move-compiler-v2] clean up a few remaining issues in lambda parser/front-end code Nov 22, 2024
@brmataptos brmataptos marked this pull request as ready for review November 22, 2024 01:45
env.error(
&loc,
// TODO(LAMBDA)
"Lambdas expressions with `store` ability currently may only be a simple call to an existing `public` function. This lambda expression requires defining a `public` helper function, which might affect module upgradeability and is not yet supported."
Copy link
Contributor

Choose a reason for hiding this comment

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

This error message looks a little bit confusing for users (e.g what is a helper function and how it may affect upgradeability). Maybe just remove requires defining a public helper function, which might affect module upgradeability` and just saying it is not supported yet?

env.error(
&loc,
&format!(
"captured variable `{}` must have a value with `copy` ability", // TODO(LAMBDA)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a test case for this error?

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