dropEmptyInitThenConcatStringsSep -> concatStringSep: feature should not be empty

(System) features are unlikely to be empty strings, but when they
come in through structuredAttrs, they probably can.
I don't think this means we should drop them, but most likely they
will be dropped after this because next time they'll be parsed with
tokenizeString.

TODO: We should forbid empty features.
This commit is contained in:
Robert Hensing 2024-07-13 01:12:28 +02:00
parent f1966e22d9
commit e64643bf63

View file

@ -498,10 +498,10 @@ void LocalDerivationGoal::startBuilder()
if (!parsedDrv->canBuildLocally(worker.store)) if (!parsedDrv->canBuildLocally(worker.store))
throw Error("a '%s' with features {%s} is required to build '%s', but I am a '%s' with features {%s}", throw Error("a '%s' with features {%s} is required to build '%s', but I am a '%s' with features {%s}",
drv->platform, drv->platform,
dropEmptyInitThenConcatStringsSep(", ", parsedDrv->getRequiredSystemFeatures()), concatStringsSep(", ", parsedDrv->getRequiredSystemFeatures()),
worker.store.printStorePath(drvPath), worker.store.printStorePath(drvPath),
settings.thisSystem, settings.thisSystem,
dropEmptyInitThenConcatStringsSep<StringSet>(", ", worker.store.systemFeatures)); concatStringsSep<StringSet>(", ", worker.store.systemFeatures));
/* Create a temporary directory where the build will take /* Create a temporary directory where the build will take
place. */ place. */