@joebigelow / wix-1 / commits / 7113e775

Symbols won't have section ids.

Rob Mensching committed Sep 24, 2022 at 10:58 UTC 7113e775cf68aba493c5e769e8e5584db15d1974
2 files changed -32
src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
-3
@@ -1183,9 +1183,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1183 var customRow = this.CreateRow(firstCellSymbol, customTableDefinition);
1184 var customRowFieldsByColumnName = customRow.Fields.ToDictionary(f => f.Column.Name);
1185
1186 -#if TODO // SectionId seems like a good thing to preserve.
1187 - customRow.SectionId = symbol.SectionId;
1188 -#endif
1186 foreach (var cell in rowOfCells)
1187 {
1188 var data = cell.Data;
src/wix/WixToolset.Core/Linker.cs
-29
@@ -22,8 +22,6 @@ namespace WixToolset.Core
22 {
23 private static readonly string EmptyGuid = Guid.Empty.ToString("B");
24
25 - private readonly bool sectionIdOnRows;
26 -
25 /// <summary>
26 /// Creates a linker.
27 /// </summary>
@@ -31,7 +29,6 @@ namespace WixToolset.Core
29 {
30 this.ServiceProvider = serviceProvider;
31 this.Messaging = this.ServiceProvider.GetService<IMessaging>();
34 - this.sectionIdOnRows = true; // TODO: what is the correct value for this?
32 }
33
34 private IServiceProvider ServiceProvider { get; }
@@ -182,18 +179,8 @@ namespace WixToolset.Core
179 // metadata.
180 var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type);
181
185 - var sectionCount = 0;
186 -
182 foreach (var section in sections)
183 {
189 - sectionCount++;
190 -
191 - var sectionId = section.Id;
192 - if (null == sectionId && this.sectionIdOnRows)
193 - {
194 - sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture);
195 - }
196 -
184 foreach (var symbol in section.Symbols)
185 {
186 if (find.RedundantSymbols.Contains(symbol))
@@ -289,22 +276,6 @@ namespace WixToolset.Core
276 }
277 }
278
292 - // Correct the section Id in FeatureComponents table.
293 - if (this.sectionIdOnRows)
294 - {
295 -#if TODO_DO_SYMBOLS_NEED_SECTIONIDS
296 - var componentSectionIds = resolvedSection.Symbols.OfType<ComponentSymbol>().ToDictionary(c => c.Id.Id, c => c.SectionId);
297 -
298 - foreach (var featureComponentSymbol in resolvedSection.Symbols.OfType<FeatureComponentsSymbol>())
299 - {
300 - if (componentSectionIds.TryGetValue(featureComponentSymbol.ComponentRef, out var componentSectionId))
301 - {
302 - featureComponentSymbol.SectionId = componentSectionId;
303 - }
304 - }
305 -#endif
306 - }
307 -
279 // Copy the wix variable rows to the output now that all overriding has been accounted for.
280 foreach (var symbol in wixVariables.Values)
281 {