Skip to content

Conversation

@monkey0506
Copy link
Owner

@monkey0506 monkey0506 commented Oct 5, 2024

This implements the Marshal map feature as described in #21. However, it also introduces another parameter that requires static value analysis, obligating the argument in source to be a compile-time constant expression (e.g., the argument must be a new expression that has a statically parsable collection initializer; or a field-reference to a static readonly field initialized inline).

This would introduce a number of new diagnostics, which is undesirable. Instead, this PR will depend on #24. After that issue is resolved, the MarshalMap should also be implemented with a runtime fallback condition (also discussed in #21) before this PR is merged.

@monkey0506 monkey0506 added the enhancement New feature or request label Oct 5, 2024
@monkey0506 monkey0506 added this to the v2.0.0 milestone Oct 5, 2024
@monkey0506 monkey0506 self-assigned this Oct 5, 2024
@monkey0506
Copy link
Owner Author

Additionally, this PR was created early as a proof-of-concept for the feature. The branch should be considered volatile and subject to force-pushed changes (namely, to remove the "// TODO - diagnostic" references littered about the code).

@monkey0506
Copy link
Owner Author

The runtime fallbacks idea simply cannot work for marshalling behaviors. See #26. This feature will require new diagnostics to be added.

@monkey0506 monkey0506 merged commit 1e4e15a into interceptors Oct 6, 2024
@monkey0506 monkey0506 deleted the marshal-map branch October 6, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants