Pass custom values through stack frames - #631
Open
jesseditson wants to merge 1 commit into
Open
jesseditson wants to merge 1 commit into
jesseditson wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or 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
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.
In Archival, we have a few object types that are effectively structs. These never make sense to render directly, but it's a common mistake to attempt to render them, which results in the ValueView dumping their contents directly into the markup. I was exploring how I might solve for this, and it seemed like this approach might be the blessed way to do it:
archival-dev/archival#57
Specifically:
https://github.com/archival-dev/archival/pull/57/changes#diff-a7277fbc6a795fb78611f12675ebeaa7a10b5106586f424600c17db377b2387aR1-R28
And the implementation:
https://github.com/archival-dev/archival/pull/57/changes#diff-66d98e8e5325d54b2cb52cafc26ba21d8e2b36ab9294e9f233f78f0192d743e8R105-R152
However this change doesn't work against liquid-rust's main, due to the to_owned copy. I believe this PR is all that is needed to allow consumers to wrap and custom render.
Related: #521