Skip to content

Deprecate case randomization feature#206

Merged
marc-vanderwal merged 2 commits into
zonemaster:developfrom
marc-vanderwal:feature/#160/part-1
Sep 5, 2024
Merged

Deprecate case randomization feature#206
marc-vanderwal merged 2 commits into
zonemaster:developfrom
marc-vanderwal:feature/#160/part-1

Conversation

@marc-vanderwal

Copy link
Copy Markdown
Contributor

Purpose

This PR adds deprecation warnings for the experimental (and thus also seemingly untested) case randomization feature that can be optionally compiled in Zonemaster::LDNS.

Context

See issue #160.

Changes

Warn end users about the upcoming removal of this feature in three places:

  • the documentation;
  • the Makefile.PL script;
  • and the C code.

How to test this PR

In the root of the source tree of Zonemaster::LDNS, run cpanm -v --configure-args="--random" ..

In the first 30 lines of the console output, expect:

Feature randomized capitalization enabled
WARNING: This feature is DEPRECATED and will be removed in Zonemaster v2025.1.

During the build stage, also expect a compiler-generated warning like so:

src/assist.c: In function ‘randomize_capitalization’:
src/assist.c:187:2: warning: #warning "Case randomization is deprecated and will be removed in v2025.1." [-Wcpp]

Expect unit tests to pass.

Then, run cpanm -v .. Expect none of the aforementioned deprecation warnings to appear in the output, and expect unit tests to pass.

This feature has always been experimental and seems to have been
implemented a long time ago to test Zonemaster::LDNS internals. However,
there are better ways to ensure that.

This commit introduces deprecation warnings in three places:

 * in the documentation;
 * when executing Makefile.PL;
 * and during compilation of the C and XS code.

Hopefully, having the same warning in three different places will be
enough to alert end users.
Case in point (heh) of how little use the experimental case
randomization feature had: one unit tests broke without anyone noticing
it.

We can reverse this patch later when the feature is actually removed.
@marc-vanderwal marc-vanderwal merged commit 17b3a80 into zonemaster:develop Sep 5, 2024
@tgreenx tgreenx linked an issue Sep 12, 2024 that may be closed by this pull request
@tgreenx tgreenx added the V-Patch Versioning: The change gives an update of patch in version. label Sep 12, 2024
@MichaelTimbert MichaelTimbert added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-ReleaseTested Status: The PR has been successfully tested in release testing V-Patch Versioning: The change gives an update of patch in version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove feature "Randomized capitalization"

4 participants