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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infer] Richer value representation for custom resources #212

Open
iwahbe opened this issue Apr 7, 2024 · 1 comment
Open

[infer] Richer value representation for custom resources #212

iwahbe opened this issue Apr 7, 2024 · 1 comment
Labels
kind/enhancement Improvements or new features

Comments

@iwahbe
Copy link
Member

iwahbe commented Apr 7, 2024

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Many infer functions operate on strongly typed values, but there is currently no way for these values to encode that a location is secret. We should enhance the surface area of types to allow for this richer information.

Related: #155

Affected area/feature

@iwahbe iwahbe added the kind/enhancement Improvements or new features label Apr 7, 2024
@iwahbe
Copy link
Member Author

iwahbe commented Apr 7, 2024

If we wanted to be really fancy (and a bit magical), we could implement pointer based lookup functions for input structs:

func IsSecret[T any](p.Context, *T) bool
func IsComputed[T any](p.Context, *T) bool

Working similarly to infer.Annotor, these functions would be used to index into a precomputed metadata table on the input type by value location. This would require that inputs are passed by reference to preserve location, and would return false for any moved value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

1 participant