how to deprecate types? #91

Closed
opened 2021-11-20 13:23:45 +00:00 by ungleich-gitea · 11 comments

since __file has --onchange now, then __config_file is redundant.

same with __apt_key_uri, if I add --uri to __apt_key (!779).

maybe symlink __config_file to __file and __apt_key_uri to __apt_key, because parameters are compatible?

i, myself, would just remove them and write that in changelog IN CAPS. dragging along legacy is tiresome.

since `__file` has `--onchange` now, then `__config_file` is redundant. same with `__apt_key_uri`, if I add `--uri` to `__apt_key` (!779). maybe symlink `__config_file` to `__file` and `__apt_key_uri` to `__apt_key`, because parameters are compatible? i, myself, would just remove them and write that in changelog IN CAPS. dragging along legacy is tiresome.
ungleich-gitea added the
doing
label 2021-11-20 13:23:45 +00:00
poljakowski was assigned by ungleich-gitea 2021-11-20 13:23:45 +00:00
Author
Owner

closed

closed
Author
Owner
Resolved in https://code.ungleich.ch/ungleich-public/cdist/merge_requests/783
Author
Owner

mentioned in merge request !783

mentioned in merge request !783
Author
Owner

assigned to @poljakowski

assigned to @poljakowski
Author
Owner

@steven Do you perhaps have a better idea?

@steven Do you perhaps have a better idea?
Author
Owner

@nico But, with default saving output streams, type stderr output won't be explicitly visible.

@nico But, with default saving output streams, type stderr output won't be explicitly visible.
Author
Owner

Yes, that is even better, output WARN in type code and then remove it, no need for core changes. I like it :)

Yes, that is even better, output WARN in type code and then remove it, no need for core changes. I like it :)
Author
Owner

Easy solution in general: output warning to STDERR. Remove in the next or overnext major version.

Easy solution in general: output warning to STDERR. Remove in the next or overnext major version.
Author
Owner

Regarding some type parameter, type's implementation is responsible for deprecation warning on deprecated parameter usage.

Regarding some type parameter, type's implementation is responsible for deprecation warning on deprecated parameter usage.
Author
Owner

@ander @nico How about adding deprecated type marker? On such type usage cdist logs warning line. And after some time we remove the type.

@ander @nico How about adding `deprecated` type marker? On such type usage cdist logs warning line. And after some time we remove the type.
Author
Owner

changed the description

changed the description
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#91
No description provided.