crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Wrong <meta name="generator" content> value in docs

Open Sija opened this issue 4 years ago • 7 comments

Docs generated via crystal docs have <meta name="generator" content> value from the crystal version used to build the compiler instead of the compiled one, being one-of - ie. docs generated with crystal 0.35.1 have crystal 0.34.0 given and docs build for master have crystal version 0.35.1 given.

Sija avatar Jan 16 '21 00:01 Sija

The value used by the docs generator is Crystal::VERSION which is the actual version of the compiler, also reported by crystal --version. So that should be correct. And CI should use the freshly built compiler to build the docs, so it should really be identical to project_version. In fact, the build_docs job for 0.35.1 docs reports running with Crystal 0.35.1 [5999ae29b] (2020-06-19) ( https://app.circleci.com/pipelines/github/crystal-lang/crystal/3875/workflows/528b3e80-5102-4267-a3f5-1855d3f4b667/jobs/48703). No idea what's going wrong here.

straight-shoota avatar Jan 16 '21 12:01 straight-shoota

FWIW crystal --version seems to be using Crystal::Config.version which reads the VERSION file directly while Crystal::VERSION is a built in constant based on that value. So might be some issue with using a built in constant within the compiler itself? Could maybe just replace this tag with Crystal::Config.version and call it a day?

Blacksmoke16 avatar Apr 11 '22 23:04 Blacksmoke16

I don’t understand why this is an issue. I think the doc generator works as expected. It makes sense to me that the generator version matches with the version of the compiler performing the doc generation.

potomak avatar Jul 08 '22 02:07 potomak

It makes sense to me that the generator version matches with the version of the compiler performing the doc generation.

@potomak it doesn't, that's the issue.

Sija avatar Jul 08 '22 06:07 Sija

@Sija wouldn’t you expect to see docs with a generator version value equals to the value of ‘crystal -v’? I think that’s reasonable.

Maybe the issue is that the doc isn’t generated using the latest compiler build rather than what value is used in the template.

potomak avatar Jul 08 '22 12:07 potomak

@potomak I'd expect that the generator version put in the <meta/> would contain the value of the compiler version used to generate the docs.

Sija avatar Jul 08 '22 20:07 Sija

Where is the definition of the job that generates the docs?

potomak avatar Jul 08 '22 23:07 potomak