From 5adb4ccbdc18c0a5f3e796cd425417e9ed5f7cf9 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 9 Jul 2026 08:30:59 -0500 Subject: [PATCH 1/2] allow $schema top-level field --- crates/rattler_build_recipe/src/stage0/parser/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rattler_build_recipe/src/stage0/parser/mod.rs b/crates/rattler_build_recipe/src/stage0/parser/mod.rs index b26f679c6..c34894d43 100644 --- a/crates/rattler_build_recipe/src/stage0/parser/mod.rs +++ b/crates/rattler_build_recipe/src/stage0/parser/mod.rs @@ -254,7 +254,8 @@ fn parse_single_output_recipe_with_config( let key_str = key.as_str(); if !matches!( key_str, - "package" + "$schema" + | "package" | "build" | "about" | "requirements" From 8aec1a3dbad365588970ae6212911398fe1289ca Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 9 Jul 2026 08:45:52 -0500 Subject: [PATCH 2/2] Replace magic comment with $schema in a test file --- test-data/recipes/test-parsing/single_output.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-data/recipes/test-parsing/single_output.yaml b/test-data/recipes/test-parsing/single_output.yaml index 4046bd801..43b07061c 100644 --- a/test-data/recipes/test-parsing/single_output.yaml +++ b/test-data/recipes/test-parsing/single_output.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json +$schema: https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json schema_version: 1 # a recipe with all possible fields package: