« get me outta code hell

Revert "infra: report who sourced unfulfilled relations" - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content-function.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-02 09:36:48 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-02 09:36:48 -0300
commit405e52004060d6db628010c8593d5663ea1f3032 (patch)
treee9760af727beaa2147a8481c94f277dc65ccc1d2 /src/content-function.js
parente09e11f1b933fa67f07c9f5e4340466f89672c8b (diff)
Revert "infra: report who sourced unfulfilled relations"
This reverts commit e09e11f1b933fa67f07c9f5e4340466f89672c8b.
Diffstat (limited to 'src/content-function.js')
-rw-r--r--src/content-function.js19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/content-function.js b/src/content-function.js
index ede5bb7..921b5bc 100644
--- a/src/content-function.js
+++ b/src/content-function.js
@@ -206,8 +206,6 @@ export function fulfillDependencies({
   return newFulfilledDependencies;
 }
 
-export const sourceAnnotation = Symbol('Source');
-
 export function getRelationsTree(dependencies, contentFunctionName, wikiData, ...args) {
   const relationIdentifier = Symbol('Relation');
 
@@ -236,11 +234,7 @@ export function getRelationsTree(dependencies, contentFunctionName, wikiData, ..
 
     const relationFunction = (name, ...args) => {
       const relationSymbol = Symbol(relationSymbolMessage(name));
-      relationSlots[relationSymbol] = {
-        name,
-        args,
-        [sourceAnnotation]: contentFunctionName,
-      };
+      relationSlots[relationSymbol] = {name, args};
       return {[relationIdentifier]: relationSymbol};
     };
 
@@ -258,7 +252,6 @@ export function getRelationsTree(dependencies, contentFunctionName, wikiData, ..
         ]));
 
     return {
-      [sourceAnnotation]: contentFunctionName,
       layout: relationsLayout,
       slots: relationSlots,
       tree: relationsTree,
@@ -296,7 +289,6 @@ export function flattenRelationsTree({
         name: slots[slot].name,
         args: slots[slot].args,
         relations: tree[slot]?.layout ?? null,
-        [sourceAnnotation]: slots[slot][sourceAnnotation],
       };
     }
   }
@@ -443,16 +435,11 @@ export function quickEvaluate({
 
   const slotResults = {};
 
-  function runContentFunction({
-    name,
-    args,
-    relations: flatRelations,
-    [sourceAnnotation]: sourceName,
-  }) {
+  function runContentFunction({name, args, relations: flatRelations}) {
     const contentFunction = fulfilledContentDependencies[name];
 
     if (!contentFunction) {
-      throw new Error(`Content function ${name} unfulfilled or not listed (from ${sourceName})`);
+      throw new Error(`Content function ${name} unfulfilled or not listed`);
     }
 
     const sprawl =