Address pr review

This commit is contained in:
Dennis Kobert
2026-08-02 14:31:13 +00:00
parent 8686b2c891
commit e372f78b7e
5 changed files with 15 additions and 6 deletions

View File

@@ -231,9 +231,9 @@ impl PerPixelAdjustCodegen<'_> {
description: "".to_string(),
widget_override: Default::default(),
ty: ParsedFieldType::Regular(RegularParsedField {
ty: parse_quote!(std::sync::Arc<WgpuExecutor>),
ty: parse_quote!(#wgpu_executor::WgpuExecutorHandle),
exposed: true,
value_source: ParsedValueSource::Scope(Box::new(parse_quote!("graphene_std::platform_application_io::WgpuExecutorArcNode"))),
value_source: ParsedValueSource::Scope(Box::new(parse_quote!("graphene_std::platform_application_io::WgpuExecutorNode"))),
number_soft_min: None,
number_soft_max: None,
number_hard_min: None,

View File

@@ -24,6 +24,15 @@ pub fn validate_node_fn(parsed: &ParsedNodeFn) -> syn::Result<()> {
fn validate_async_source(parsed: &ParsedNodeFn) {
let snapshot_ctx = matches!(&parsed.input.ty, Type::Path(path) if path.path.segments.last().is_some_and(|segment| segment.ident == "CtxSnapshot"));
let future_kernel = crate::codegen::is_source_kernel(&parsed.output_type);
if let Some(placeholder) = &parsed.attributes.placeholder
&& !parsed.is_async
&& !future_kernel
{
emit_error!(
placeholder.span(),
"`placeholder` applies only to async and source kernels; a synchronous node never reports `Partial`, so the stand-in is unused"
);
}
if parsed.is_async && future_kernel {
emit_error!(
parsed.output_type.span(),