From e09e11f1b933fa67f07c9f5e4340466f89672c8b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 2 Jun 2023 09:30:20 -0300 Subject: infra: report who sourced unfulfilled relations --- src/write/build-modes/live-dev-server.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/write/build-modes') diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index 10b40cf0..3d29a83f 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -33,6 +33,7 @@ import { flattenRelationsTree, getRelationsTree, getNeededContentDependencyNames, + sourceAnnotation, } from '../../content-function.js'; const defaultHost = '0.0.0.0'; @@ -429,11 +430,16 @@ export async function go({ const slotResults = {}; - function runContentFunction({name, args, relations: flatRelations}) { + function runContentFunction({ + name, + args, + relations: flatRelations, + [sourceAnnotation]: sourceName, + }) { const contentFunction = fulfilledContentDependencies[name]; if (!contentFunction) { - throw new Error(`Content function ${name} unfulfilled or not listed`); + throw new Error(`Content function ${name} unfulfilled or not listed (from ${sourceName})`); } const sprawl = -- cgit 1.3.0-6-gf8a5