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

Move Markdown to inside the compiler. #8115

Merged
merged 1 commit into from Aug 26, 2019

Conversation

@asterite
Copy link
Member

commented Aug 24, 2019

The Markdown module is buggy and not feature complete. We shouldn't expose it in the standard library. For the compiler's purposes (crystal doc) it might be good but users should be encouraged to use a better library. Eventually the crystal doc tool should somehow use a different, better markdown library.

If with time we decide to improve it and make it feature complete and without bugs we could consider re-exposing it again. But right now this can't go like this in 1.0.

Related to #7463, #7009, #4613, #8113

The Markdown module is buggy and not feature complete.
We shouldn't expose it in the standard library. For the compiler's
purposes (`crystal doc`) it might be good but users should be encouraged
to use a better library. Eventually the `crystal doc` tool should
somehow use a different, better markdown library.
@RX14
RX14 approved these changes Aug 25, 2019
@asterite asterite added this to the 0.31.0 milestone Aug 26, 2019
@asterite asterite merged commit 491f26b into crystal-lang:master Aug 26, 2019
4 of 5 checks passed
4 of 5 checks passed
ci/circleci: test_darwin Your tests failed on CircleCI
Details
ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@asterite asterite deleted the asterite:hide-markdown branch Aug 26, 2019
@drujensen

This comment has been minimized.

Copy link
Contributor

commented Sep 7, 2019

This light markdown is very useful for simple cases i.e. doc generation. It's being used by Amber's html helpers. The reason given for hiding this was to encourage use of better libraries but the only one I see available is https://github.com/icyleaf/markd. It is a full featured common markdown but it is slow. What is the recommended replacement?

@asterite

This comment has been minimized.

Copy link
Member Author

commented Sep 7, 2019

I would recommend trying to optimize markd. You can also use the internal. Markdown type, it will still work but it's not recommended.

@asterite

This comment has been minimized.

Copy link
Member Author

commented Sep 7, 2019

Also if you tell me how it's slow I can try to optimize it because I like those problems.

@drujensen

This comment has been minimized.

Copy link
Contributor

commented Sep 7, 2019

@asterite

This comment has been minimized.

Copy link
Member Author

commented Sep 7, 2019

@drujensen I'm currently optimizing markd, it's fun :-)

So far I went from 11.21 times slower than std's Markdown to 5.40 times slower. It's still slower, but the gap is getting smaller. And I plan to continue optimizing. Of course it won't reach std's performance because std is incomplete and has bugs and implementing the missing stuff will make it slower.

In fact maybe we should eventually just move markd into the standard library somehow and use it for the docs.

@straight-shoota

This comment has been minimized.

Copy link
Member

commented Sep 7, 2019

In fact maybe we should eventually just move markd into the standard library somehow and use it for the docs.

-> #4613

bcardiff added a commit that referenced this pull request Sep 7, 2019
This reverts commit 491f26b.
bcardiff added a commit that referenced this pull request Sep 10, 2019
This reverts commit 491f26b.
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library, which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode/g' "{}" \;
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;

and

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;

tmp
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;

and

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
leonklingele added a commit to leonklingele/invidious that referenced this pull request Sep 23, 2019
Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
omarroth added a commit to omarroth/invidious that referenced this pull request Sep 24, 2019
…te dependencies (#764)

* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See crystal-lang/crystal#8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.