Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove projects when discovered translators do not match user specified translators #269

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ in let

getProjectKey = project: "${project.name}_|_${project.subsystem}_|_${project.relPath}";

# Remove projects whose translator's do not match with the translator
# specified by the user
discoveredProjectsStrict =
if l.length settings != 0 && b.hasAttr "translator" (b.elemAt settings 0)
then
l.filter
(project: b.elem (b.elemAt settings 0).translator project.translators)
discoveredProjects
else discoveredProjects;

# list of projects extended with some information requried for processing
projectsList =
l.map
Expand All @@ -478,7 +488,7 @@ in let
};
in
self))
discoveredProjects;
discoveredProjectsStrict;

# projects without existing valid dream-lock.json
projectsPureUnresolved =
Expand All @@ -498,7 +508,7 @@ in let
(proj: let
translator = getTranslator proj.translator;
dreamLock'' = translator.translate {
inherit source tree discoveredProjects;
inherit source tree discoveredProjectsStrict;
project = proj;
};

Expand Down