test.check

Typo: alpha-numeric should be alphanumeric

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

This replaces all instances of alpha-numeric with alphanumeric. This includes renaming the following functions:

char-alpha-numeric -> char-alphanumeric
string-alpha-numeric -> string-alphanumeric

Activity

Hide
Reid Draper added a comment -

test.check hasn't reached 1.0, so we can break backward compatibility. However, I want to still communicate clearly to users. Maybe we can leave a definition of the hyphenated versions that raises a 'deprecated/removed' exception?

Show
Reid Draper added a comment - test.check hasn't reached 1.0, so we can break backward compatibility. However, I want to still communicate clearly to users. Maybe we can leave a definition of the hyphenated versions that raises a 'deprecated/removed' exception?
Hide
John Walker added a comment - - edited

This seems reasonable. Are generators of this form alright?

(defn make-deprecated-generator
  ([msg map]
     (make-gen
      (fn [_ _]
        (throw (ex-info msg map)))))
  ([msg map cause]
     (make-gen
      (fn [_ _]
        (throw (ex-info msg map cause))))))

(def
  ^{:deprecated "TODO"}
  char-alpha-numeric
  "DEPRECATED - use char-alphanumeric instead."
  (make-deprecated-generator "DEPRECATED - use char-alphanumeric instead." {:deprecated "TODO"}))

If so, I can supply a macro to create these things. It would attach the metadata like docstrings and the deprecation version to the var, and usage might look like

(def-deprecated-generator char-alpha-numeric 
  "DEPRECATED - use char-alphanumeric instead."
  {:deprecated "TODO"})
Show
John Walker added a comment - - edited This seems reasonable. Are generators of this form alright?
(defn make-deprecated-generator
  ([msg map]
     (make-gen
      (fn [_ _]
        (throw (ex-info msg map)))))
  ([msg map cause]
     (make-gen
      (fn [_ _]
        (throw (ex-info msg map cause))))))

(def
  ^{:deprecated "TODO"}
  char-alpha-numeric
  "DEPRECATED - use char-alphanumeric instead."
  (make-deprecated-generator "DEPRECATED - use char-alphanumeric instead." {:deprecated "TODO"}))
If so, I can supply a macro to create these things. It would attach the metadata like docstrings and the deprecation version to the var, and usage might look like
(def-deprecated-generator char-alpha-numeric 
  "DEPRECATED - use char-alphanumeric instead."
  {:deprecated "TODO"})
Hide
Reid Draper added a comment -

I think I may be changing my mind here. I'm thinking we should have one release where the two names are both present. Make some noise about it in the release notes, and attach the :deprecated tag on the metadata. Would you mind making a patch to just add the new names, and add a ^{:deprecated ...} tag on the existing names? Sorry for the back and forth.

Show
Reid Draper added a comment - I think I may be changing my mind here. I'm thinking we should have one release where the two names are both present. Make some noise about it in the release notes, and attach the :deprecated tag on the metadata. Would you mind making a patch to just add the new names, and add a ^{:deprecated ...} tag on the existing names? Sorry for the back and forth.
Hide
John Walker added a comment -

Thats fair. How should we handle it after that release?

Show
John Walker added a comment - Thats fair. How should we handle it after that release?
Hide
John Walker added a comment -

This patch replaces alpha-numeric with alphanumeric, and attaches :deprecated "0.6.0" to char-alpha-numeric and string-alpha-numeric in favor of char-alphanumeric and string-alphanumeric.

Show
John Walker added a comment - This patch replaces alpha-numeric with alphanumeric, and attaches :deprecated "0.6.0" to char-alpha-numeric and string-alpha-numeric in favor of char-alphanumeric and string-alphanumeric.
Hide
Reid Draper added a comment -

Patch applied in 6def75ebc80cc5c1ab66ae956c76a7b402198852.

Show
Reid Draper added a comment - Patch applied in 6def75ebc80cc5c1ab66ae956c76a7b402198852.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: