From d133db4e6ef7ca94eb6be283e823f79a28c9265d Mon Sep 17 00:00:00 2001 From: gac bernina Date: Tue, 25 Aug 2026 20:28:09 +0200 Subject: [PATCH] env change --- eco/utilities/config.py | 18 ++++++++++++++++-- scripts/eco-dev | 3 ++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/eco/utilities/config.py b/eco/utilities/config.py index 2619318..71d6785 100644 --- a/eco/utilities/config.py +++ b/eco/utilities/config.py @@ -991,10 +991,24 @@ class Namespace(Assembly): starttime = time() try: titem = self.get_obj(name) + if isinstance(titem, Proxy): + # Proxy.__class__/__dir__ deliberately stay "shy" (report + # LazyComponent / dir(LazyComponent)) while unresolved, so + # that introspection - dir(), isinstance() against the + # eventual wrapped type - can't accidentally trigger a real + # device build (see Proxy's docstring). That means this + # method can no longer use isinstance(titem, + # InitialisationWaitable)/dir(titem) to *deliberately* force + # resolution either - both now silently no-op on a still-lazy + # proxy instead of building it, which used to leave every + # name "successfully" init_name()'d without ever actually + # leaving lazy_items (confirmed: init_all() reported success + # while initialized_names stayed empty). __wrapped__ isn't + # shy-cased, so accessing it forces the factory to run and + # returns the real, resolved object. + titem = titem.__wrapped__ if isinstance(titem, InitialisationWaitable): titem._wait_for_initialisation() - else: - dir(titem) self.initialisation_times[name] = time() - starttime if verbose and not quiet: print( diff --git a/scripts/eco-dev b/scripts/eco-dev index a4f97a5..83aaf48 100755 --- a/scripts/eco-dev +++ b/scripts/eco-dev @@ -18,7 +18,8 @@ # first, ahead of the real install sitting in the same environment. # Verified: `python -c "import eco; print(eco.__file__)"` resolves to the # real install without this, and to this checkout with it. -source bpy-default.sh +#source bpy-default.sh +source bpy-env export PYTHONPATH="/sf/bernina/code/gac-bernina/eco${PYTHONPATH:+:$PYTHONPATH}" exec python /sf/bernina/code/gac-bernina/eco/eco_cli.py "$@"