mirror of
https://github.com/wled/WLED.git
synced 2025-07-14 06:16:36 +00:00
Merge pull request #4738 from willmmiles/validate-usermods-after-removal
Fix validation after removing a usermod
This commit is contained in:
commit
bbfe90d2ca
@ -77,9 +77,10 @@ def wrapped_ConfigureProjectLibBuilder(xenv):
|
|||||||
for dep in result.depbuilders:
|
for dep in result.depbuilders:
|
||||||
cached_add_includes(dep, processed_deps, extra_include_dirs)
|
cached_add_includes(dep, processed_deps, extra_include_dirs)
|
||||||
|
|
||||||
|
wled_deps = [dep for dep in result.depbuilders if is_wled_module(dep)]
|
||||||
|
|
||||||
broken_usermods = []
|
broken_usermods = []
|
||||||
for dep in result.depbuilders:
|
for dep in wled_deps:
|
||||||
if is_wled_module(dep):
|
|
||||||
# Add the wled folder to the include path
|
# Add the wled folder to the include path
|
||||||
dep.env.PrependUnique(CPPPATH=str(wled_dir))
|
dep.env.PrependUnique(CPPPATH=str(wled_dir))
|
||||||
# Add WLED's own dependencies
|
# Add WLED's own dependencies
|
||||||
@ -97,6 +98,9 @@ def wrapped_ConfigureProjectLibBuilder(xenv):
|
|||||||
err=True)
|
err=True)
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
|
# Save the depbuilders list for later validation
|
||||||
|
xenv.Replace(WLED_MODULES=wled_deps)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Apply the wrapper
|
# Apply the wrapper
|
||||||
|
@ -53,20 +53,8 @@ def validate_map_file(source, target, env):
|
|||||||
secho(f"ERROR: Map file not found: {map_file_path}", fg="red", err=True)
|
secho(f"ERROR: Map file not found: {map_file_path}", fg="red", err=True)
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
# Identify the WLED module source directories
|
# Identify the WLED module builders, set by load_usermods.py
|
||||||
module_lib_builders = [builder for builder in env.GetLibBuilders() if is_wled_module(env, builder)]
|
module_lib_builders = env['WLED_MODULES']
|
||||||
|
|
||||||
if env.GetProjectOption("custom_usermods","") == "*":
|
|
||||||
# All usermods build; filter non-platform-OK modules
|
|
||||||
module_lib_builders = [builder for builder in module_lib_builders if env.IsCompatibleLibBuilder(builder)]
|
|
||||||
else:
|
|
||||||
incompatible_builders = [builder for builder in module_lib_builders if not env.IsCompatibleLibBuilder(builder)]
|
|
||||||
if incompatible_builders:
|
|
||||||
secho(
|
|
||||||
f"ERROR: Modules {[b.name for b in incompatible_builders]} are not compatible with this platform!",
|
|
||||||
fg="red",
|
|
||||||
err=True)
|
|
||||||
Exit(1)
|
|
||||||
|
|
||||||
# Extract the values we care about
|
# Extract the values we care about
|
||||||
modules = {Path(builder.build_dir).name: builder.name for builder in module_lib_builders}
|
modules = {Path(builder.build_dir).name: builder.name for builder in module_lib_builders}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user