File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,26 @@ string[] getChangedBuildFiles(ProjectNode root, CompilingSession s)
186186 return buildFiles;
187187}
188188
189+ void createSelectionsfile (const ProjectNode tree)
190+ {
191+ import std.file ;
192+ import std.string :replace;
193+ if (exists(" dub.selections.json" ))
194+ return ;
195+ string dubSelections = " {" ;
196+
197+ bool isFirst = true ;
198+
199+ foreach (ProjectNode node; tree.collapse)
200+ {
201+ if (! isFirst) dubSelections~= " ," ;
202+ isFirst = false ;
203+ dubSelections~= ' "' ~ node.name~ " :" ~ node.req.version_ ? (" \" " ~ node.req.version_~ " \" " ) : " {\" path\" : \" " ~ replace(node.req.cfg.workingDir, " \\ " , " \\\\ " )~ " \" }" ;
204+ }
205+
206+ std.file.write (" dub.selections.json" , dubSelections~ " }" );
207+ }
208+
189209
190210ProjectDetails buildProject (ProjectDetails d)
191211{
@@ -209,6 +229,7 @@ ProjectDetails buildProject(ProjectDetails d)
209229 else
210230 invalidateCaches(d.tree,session, sharedFormula);
211231 ProjectNode tree = d.tree;
232+ createSelectionsFile(tree);
212233 if (d.useExistingObjFiles)
213234 tree.requirements.cfg.changedBuildFiles = getChangedBuildFiles(tree, session);
214235 // /TODO: Might be reactivated if that issue shows again.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import redub.package_searching.api;
88
99
1010// /vX.X.X
11- enum RedubVersionOnly = " v1.21.8 " ;
11+ enum RedubVersionOnly = " v1.21.9 " ;
1212// /Redub vX.X.X
1313enum RedubVersionShort = " Redub " ~ RedubVersionOnly;
1414// /Redub vX.X.X - Description
You can’t perform that action at this time.
0 commit comments