From 178795f5161a2289efbbeacbdbb5a1463c07e4b8 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Sat, 26 Aug 2023 22:47:33 -0700 Subject: [PATCH] protcur server avoid tag population logspam --- protcur/protcur/server.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/protcur/protcur/server.py b/protcur/protcur/server.py index aa77adf..2b01c17 100755 --- a/protcur/protcur/server.py +++ b/protcur/protcur/server.py @@ -586,11 +586,6 @@ def make_server_app(memfile=None, comments=True): helpers=helpers) stream_thread.start() - # FIXME put this on AstGeneric - for t in justTags(): - protc._tagIndex[t] = set() - Hybrid._tagIndex[t] = set() - for h in helpers: h._annos_list = annos if not h._annos_list: @@ -599,6 +594,17 @@ def make_server_app(memfile=None, comments=True): [h(a, h._annos_list) for a in h._annos_list] # TODO stepping stone to passing annos as a dict [o.populateTags() for o in h] + # FIXME put this on AstGeneric + for t in justTags(): + # this must run after populating the helpers otherwise + # e.g. Hybrid will produce counless warnings because it + # needs replies to populate tags + if t not in protc._tagIndex: + protc._tagIndex[t] = set() + + if t not in Hybrid._tagIndex: + Hybrid._tagIndex[t] = set() + app = make_app(annos) make_sparc(app, comments=comments)