Skip to content

Commit 913e76c

Browse files
committed
Remove duplicate preset declarations
As noted by suggestions by @benlangmuir the presets are actually duplicated. Therefore, they can safely be removed and not "merged". Python 3's [configparser](https://docs.python.org/3/library/configparser.html) does not parse in the same way that Python 2's did. Specifically, Python 3's does not allow duplicate sections (or in Swift parlance presets). Python 3 does provide a "strict" property that can be sent to the constructor to return to the behavior of Python 2 (e.g., `config = ConfigParser.SafeConfigParser(substitutions, allow_no_value=True, strict=False)`). However, this provides it's own set of complications in that the Python 2 version of the constructor does not. Therefore, instead of having a conditional in the runtime to detect which version of Python and build the correct initializer this patch normalizes the presets configuration file such that there are no more duplicates. This should work in both Python 2 and 3. Also worth noting: this patch is insufficient by itself to make the build scripts work with Python 3. This patch is written with the "Incremental Development" theory in mind and in preparation for other patches currently in progress.
1 parent ab29adf commit 913e76c

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

utils/build-presets.ini

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,52 +52,6 @@ installable-package=%(installable_package)s
5252
# If someone uses this for incremental builds, force reconfiguration.
5353
reconfigure
5454

55-
56-
[preset: buildbot,tools=RA,stdlib=DA]
57-
mixin-preset=
58-
mixin_buildbot_trunk_base
59-
mixin_buildbot_install_components
60-
61-
# Build Release without debug info, because it is faster to build.
62-
release
63-
assertions
64-
65-
dash-dash
66-
67-
swift-stdlib-build-type=Debug
68-
swift-stdlib-enable-assertions=true
69-
70-
[preset: buildbot,tools=RA,stdlib=RD]
71-
mixin-preset=
72-
mixin_buildbot_trunk_base
73-
mixin_buildbot_install_components
74-
75-
# Build Release without debug info, because it is faster to build.
76-
release
77-
assertions
78-
79-
dash-dash
80-
81-
swift-stdlib-build-type=RelWithDebInfo
82-
swift-stdlib-enable-assertions=false
83-
84-
[preset: buildbot,tools=RA,stdlib=RDA]
85-
mixin-preset=
86-
mixin_buildbot_trunk_base
87-
mixin_buildbot_install_components
88-
89-
# Build Release without debug info, because it is faster to build.
90-
release
91-
assertions
92-
93-
dash-dash
94-
95-
swift-stdlib-build-type=RelWithDebInfo
96-
swift-stdlib-enable-assertions=true
97-
98-
# This is a release non-incremental build. Run sil-verify-all.
99-
sil-verify-all
100-
10155
[preset: buildbot,tools=RA,stdlib=RD,test=no]
10256
mixin-preset=
10357
mixin_buildbot_trunk_base

0 commit comments

Comments
 (0)