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

Deprecate case randomization feature #206

Merged

Conversation

marc-vanderwal
Copy link
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
1 check passed
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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"
3 participants