forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #14633: fix error messages for lambdas, identify change points for more complete lambda implementation #1
Merged
brmataptos
merged 20 commits into
main
from
09-24-fix_14633_fix_error_messages_for_lambdas_identify_change_points_for_more_complete_lambda_implementation
Oct 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…aptos-labs#14578) * add options and plumbing for compile_verify_code, warn_deprecated, etc., and add final set of V1 tests to V2, except flavor tests (evm/async) * move around and edit/split tests to test same functionality in V2 as V1
Patches the indexer processors for 4.2.0
…mbda parameters (aptos-labs#14254) Allowing declared type annotations for lambda parameters. Fixes aptos-labs#6922.
The old version relies on a deprecated version of Node.js
V3 runs on a deprecated version of Node.js (16) and Github has now started forcing Node.js 20.
This reverts commit efe0365.
This reverts commit 1c65af5.
… to make more sense (aptos-labs#14384)
… points for more complete lambda implementation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @brmataptos and the rest of your teammates on Graphite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Catch all errors in
move-compiler-v2/tests/checking/typing/lambda.move
in Compiler V2,after splitting and gradually commenting out code as
lambda[2-5].move
,to avoid shadowing by other errors. Lay groundwork for support of lambdas in various capacities.
Fixes aptos-labs#14633.
function_checker
internal_error
toerror
inbytecode_generator
andmodule_generator
to properly show "error" rather than "bug" if lambdas are mistakenly used as values today.
LAMBDA_PARAMS
,LAMBDA_RESULTS
to allow lambdas as general function params or resultsLAMBDA_FIELDS
- support lambdas in struct fieldsLAMBDA_VALUES
- support lambdas in general-purpose valuesLAMBDA_TYPE_PARAMS
laterresult_type_loc
field to move-model'sFunctionData
(and model-builder'sFunEntry
)to more precisely locate errors in function result types.
GlobalEnv::internal_dump_env
to use function- and struct-specific type contextsso that types are shown with correct type parameter names.
How Has This Been Tested?
Running the usual tests.
Key Areas to Review
Note that a few errors are caught quite late, in
bytecode-generator
,and the order in which we catch errors may be a bit surprising to
users (errors in
exp_builder
come first, then errors caught byfunction_checker
, then (much later)bytecode_generator
.).Actually supporting particular subsets of the "experiments" mentioned
above would be difficult, but it seems useful to have the labels to
help understand just what features are supported by the implementation
as we go.
Type of Change
Which Components or Systems Does This Change Impact?
Checklist