Automattic / Automattic/wordpress-rs

`#[derive(WpDerivedRequest)]`'s `contextual_get` should return error for non `SparseFoo` types

Open
#152 0 comments 0 reactions 1 assignee Claimed by @oguzkocer View on GitHub
Rust
Dominant language
Rust
Stars
36
Forks
5
Avg merge
17h 30m
Merged PRs (30d)
43

Description

`contextual_get` works the same way as `#[derive(WpContextual)]` does, as it replaces `SparseFoo` with `FooWithEditContext`, `FooWithEmbedContext` & `FooWithViewContext`. To ensure that we always work with correct output types, we should return a compiler error if the `output` type of `WpDerivedRequest` doesn't have the `Sparse` prefix if the `contextual_get` attribute is used.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.