From a294f88cb0231f7bd43437dd6f573b50e434dfee Mon Sep 17 00:00:00 2001 From: Kazuki Okamoto Date: Fri, 29 Mar 2024 16:16:21 +0900 Subject: [PATCH] error on no semantic conventions yamls --- semantic-conventions/Setup.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/semantic-conventions/Setup.hs b/semantic-conventions/Setup.hs index b607be19..dd41297b 100644 --- a/semantic-conventions/Setup.hs +++ b/semantic-conventions/Setup.hs @@ -30,6 +30,7 @@ module Main (main) where import Control.Applicative (Alternative ((<|>))) +import Control.Monad (when) import qualified Data.Aeson as Json import qualified Data.Aeson.KeyMap as JsonMap import qualified Data.Char as Char @@ -478,6 +479,7 @@ preBuild _ _ = do targetDirectory = "gen/OpenTelemetry/" targetFile = targetDirectory "SemanticConventions.hs" yamlFiles <- Glob.globDir1 yamlPattern "." + when (List.null yamlFiles) $ fail "no YAML files found" models <- for yamlFiles $ \yamlFile -> do printLog $ "processing " ++ yamlFile