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 the RedCloth API compatibility layer #401

Merged
merged 3 commits into from
Jul 8, 2014

Conversation

robin850
Copy link
Collaborator

@robin850 robin850 commented Jul 7, 2014

Hello,

This is just a pull request that deprecates the RedCloth API compatibility layer. We can move the RedcarpetCompat class to its own file and remove its documentation from the README file. The only drawback is that people relying on the RedcarpetCompat class should now put require 'redcarpet/compat' in their code but this is no-sense to use it over Markdown.

We can't throw deprecation warnings as this would mess the users' output so let's simply remove any reference to it for now. We will be able to remove it once we reach Redcarpet 4.0.

Have a nice day!

Since the RedCloth API layer is now deprecated and will be removed in
4.0, let's move this class to its own file to make the main one more
clear.

We would have to require "redcarpet/compat" to be fully backward
compatible but the RedcarpetCompat class shouldn't be use anyway. It
is just a convenient way not to override the `Markdown` one if it
already exist.
robin850 added a commit that referenced this pull request Jul 8, 2014
Deprecate the RedCloth API compatibility layer
@robin850 robin850 merged commit 50cfe2e into master Jul 8, 2014
@robin850 robin850 deleted the deprecate-compat-layer branch July 8, 2014 18:12
@lsegal
Copy link
Contributor

lsegal commented Nov 25, 2014

This is a breaking change that affects all users of YARD, since YARD relies on the Compat class in 3.x. If you make a change in a minor version update you should ensure backward compatibility for the rest of the major version stream, even if the thing was deprecated.

I think the require 'redcarpet/compat' should be re-introduced to bring back proper backward compatibility for the 3.x major version. If you really want to make a backward incompatible change, make it in 4.x, not 3.x.

@sferik
Copy link

sferik commented Nov 25, 2014

We can't throw deprecation warnings as this would mess the users' output so let's simply remove any reference to it for now. We will be able to remove it once we reach Redcarpet 4.0.

Isn’t that was $stderr is for?

robin850 pushed a commit that referenced this pull request Nov 25, 2014
Fixes a backward incompatible change introduced in v3.2.0 via #401.
@robin850
Copy link
Collaborator Author

Isn’t that was $stderr is for?

Well, unless I'm wrong this isn't a problem in the general case but it is for people that are relying on the redcarpet bin script to generate Markdown documents.

Anyway, v3.2.1 has been released so you don't have to change code on your side if you want to upgrade Redcarpet.

robin850 added a commit that referenced this pull request Jan 31, 2017
As of #401, the compatibility layer lives in its own file but since
Yard provides a Redcarpet support and relies on the same symbol to
specify the provider and the require string (https://git.io/vDLyr),
we can't ask them to "require 'redcarpet/compat'" so let's still
require the compatibility layer by default.

Fixes #589.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants