Crystal: Crystal documentation master vs release

Created on 12 Jan 2019  路  2Comments  路  Source: crystal-lang/crystal

When searching for "crystal mime", you end up on the page:

https://crystal-lang.org/api/master/MIME.html

Yet, when trying out:

require "mime"

MIME.from_extension(".html")         # => "text/html; charset=utf-8"
MIME.from_filename("path/file.html") # => "text/html; charset=utf-8"

You are presented with a error as:

in /home/Crystal/Shared/Service.cr:6: while requiring "mime": can't find file 'mime'

If you're trying to require a shard:
- Did you remember to run `shards install`?
- Did you make sure you're running the compiler in the same directory as your shard.yml?

require "mime"

The issue is, that the https://crystal-lang.org/api/master/ direct to the latest development version of the documentation. And thus includes changes for Crystal 0.27.x or 0.28. As such, this can create confusion because new changes do not match with the stable released version ( namely 0.27.0 at this moment ).

This is the result of exposing the master branch onto Google and other search engines. This is a issue that needs to be addressed with some kind of information popup or a better way to deal with search engine redirects.

feature infrastructure topicdocs-generator

Most helpful comment

I don't think it's a bad thing to publish the documentation from master and have it visible in search engine. We especially want this to be available, for example to read up on upcoming features.

The major problem is, that it is not labeled appropriately. So this is essentially #4754. The master docs should simply have a big sign that says something like "This is the documentation for nightly release (0.27.1-dev.2019-01-12)".

All 2 comments

I don't think it's a bad thing to publish the documentation from master and have it visible in search engine. We especially want this to be available, for example to read up on upcoming features.

The major problem is, that it is not labeled appropriately. So this is essentially #4754. The master docs should simply have a big sign that says something like "This is the documentation for nightly release (0.27.1-dev.2019-01-12)".

This issue can be closed. Searching for crystal mime points to https://crystal-lang.org/api/0.32.1/MIME.html which is latest atm, not master. The rest is tracked in #4754 and #7011

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jhass picture jhass  路  3Comments

oprypin picture oprypin  路  3Comments

asterite picture asterite  路  3Comments

Sija picture Sija  路  3Comments

lbguilherme picture lbguilherme  路  3Comments