File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -57,18 +57,28 @@ def find_usermod(mod: str):
57
57
for spec in not_found_specs :
58
58
#print(f"LU: forcing install of {spec}")
59
59
lm .install (spec )
60
+ # Clear GetLibBuilders cache
61
+ DefaultEnvironment ().Replace (__PIO_LIB_BUILDERS = None )
60
62
61
63
62
64
# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies
63
65
# Save the old value
64
66
cplb = env .ConfigureProjectLibBuilder
65
67
# Our new wrapper
66
68
def cplb_wrapper (xenv ):
67
- # Update usermod properties
68
- lib_builders = xenv .GetLibBuilders ()
69
+ # Update usermod properties
70
+ print (xenv .GetProjectOption ('lib_deps' ))
71
+ lib_builders = xenv .GetLibBuilders ()
69
72
wled_dir = xenv ["PROJECT_SRC_DIR" ]
70
73
um_deps = [dep for dep in lib_builders if usermod_dir in Path (dep .src_dir ).parents ]
71
74
other_deps = [dep for dep in lib_builders if usermod_dir not in Path (dep .src_dir ).parents ]
75
+ if usermods and not um_deps :
76
+ # Debug: try resetting the lib builders??
77
+ print ("REPLACING??" )
78
+ xenv .Replace (__PIO_LIB_BUILDERS = None )
79
+ lib_builders = xenv .GetLibBuilders ()
80
+ um_deps = [dep for dep in lib_builders if usermod_dir in Path (dep .src_dir ).parents ]
81
+ other_deps = [dep for dep in lib_builders if usermod_dir not in Path (dep .src_dir ).parents ]
72
82
for dep in lib_builders :
73
83
print (f"Found dep: { str (dep )} " )
74
84
for um in um_deps :
You can’t perform that action at this time.
0 commit comments