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

Request For Comment: Deprecation Process #1083

Closed
aciccarello opened this issue Jul 29, 2019 · 2 comments
Closed

Request For Comment: Deprecation Process #1083

aciccarello opened this issue Jul 29, 2019 · 2 comments
Labels
discussion Discussion on large effort changes to TypeDoc

Comments

@aciccarello
Copy link
Collaborator

Problem

There have been a couple instances of features which were implemented but are no longer our recommended approach (#1029 and now #1080). So far we have sought to maintain support while encouraging the preferred pattern. However, that still leaves us supporting the old pattern.

I would like to suggest that we have a process for how features are deprecated.

Suggested Solution

I suggest a multi-step approach

  1. Implement preferred feature
    • Document on typedoc.org preferred approach and note discouraged pattern
  2. In a later release start logging warnings of deprecated pattern
    • Note change in changelog as breaking change to encourage users to switch to new feature
  3. In a later release completely remove deprecated feature

Please let me know what you think of this plan. Concerns and alternate suggestions welcome.

@aciccarello aciccarello pinned this issue Jul 29, 2019
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 31, 2019

This seems reasonable to me, but we should probably define a timeline (or # of releases) for each of the steps. My main concern is that we need to make deprecated patterns and their replacements very easy to find. For a documentation tool, we still have pretty poor docs despite the recent work.

More things to consider

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 5, 2020

I've started leaving comments in the code when I come across something that wants deprecating, they usually go something like this:

// discourage 0.13, warn 0.17, remove 0.19

To mark when a given feature began to be discouraged, when we should start giving warnings (I'm not planning any warnings before 0.17), and when it should be removed. Generally I don't want to start warning on a given feature until at least one minor version has passed, and it shouldn't be removed until at least one minor version after that, though for more common options I've been leaving larger gaps.

In particular, the src property can be used in typedoc.json to specify the input files. In 0.16 the inputFiles option will be available to replace it, so in 0.17 I'll add a warning while still preserving the previous behavior. Then in 0.19 the logic to convert src to inputFiles will be removed along with the warning.

This is in contrast to support for autodiscovery of typedoc.js, which is an incredibly popular feature (>40% of the configuration files I've looked at for TypeDoc use JS instead of JSON config files!). I don't really want to deprecate/remove that until we have a properly stable API... but I will be updating docs to encourage the use of JSON files.

@Gerrit0 Gerrit0 unpinned this issue Jun 29, 2020
@Gerrit0 Gerrit0 added the discussion Discussion on large effort changes to TypeDoc label Nov 28, 2020
@Gerrit0 Gerrit0 closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion on large effort changes to TypeDoc
Projects
None yet
Development

No branches or pull requests

2 participants