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

Rewrite manpages in Asciidoc #262

Conversation

straight-shoota
Copy link
Member

This translates the manpages to Asciidoc as suggested in #253

It's a simple translation and tries to keep close to the original. Further enhancements are probably coming.

Makefile Outdated Show resolved Hide resolved
man/shards.1.adoc Outdated Show resolved Hide resolved
Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there should be an update in the readme for the new development dependency. And I guess the crystal man page will be the next to fall.

I'm not eager in seeing a new dependency in the build process, but at least is only on the build rather than the actual development.

@jkthorne
Copy link

jkthorne commented May 1, 2019

I agree with @bcardiff concern about adding the dependency. This seems like a big dependency to add for preference in man page file format.

@straight-shoota
Copy link
Member Author

I've done a huge update on the documentation.

  • Documentation is now written in asciidoc and resides in docs/. All documentation formats are generated from a single source.
  • Man pages are automatically generated from asciidoc.
  • SPEC.md has been merged with man/shard.yml.5 into docs/shard.yml.adoc.
  • relevant parts have been synced with shards on crystal-book
  • Added documentation for new commands not yet documented
  • Added documentation for env vars

Integration with CI to build manpages automatically for shards releases is still missing. I'd like to ask for feedback first before fiddeling with that.

Next steps:

@straight-shoota
Copy link
Member Author

Bump can we please merge this before documentation gets out of sync again?

@straight-shoota
Copy link
Member Author

@bcardiff Could you take a look at this, please?

Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is really needed to move the SPEC.md to asciidocs? Maybe is because I haven't used asciidocs in the past that I am not eager to see that change.

I would suggest also to commit the generated man files. Otherwise distribution-scripts and other package mantainers will need to deal with asciidocs+python dependency. I usually prefer to avoid committing generated files, but in this case I think it make sense.

Eventually the generated man files could go away, but to avoid blocking shards releases I would go that way.

@@ -0,0 +1,392 @@
= shard.yml(5)
:date: 2020-11-13
:shards_version: 0.11.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this information right or should it get from the SHARDS_VERSION set in the Makefile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, this can be automated. IIRC I didn't implement that right away because I wasn't sure it's a good idea because it could propagate incorrect information if the documentation is not accurate for the newest version. But that's probably hard to coordinate anyways, so it might be better to assume we keep the docs always up to date and it always displays the most recent version.

@straight-shoota
Copy link
Member Author

straight-shoota commented Jan 30, 2021

Is really needed to move the SPEC.md to asciidocs?

SPEC.md is entirely merged into the manpage for shard.yml. They describe the same thing: The format of shard.yml. I don't think it makes sense to keep two separate documents with duplicate content.

I would suggest also to commit the generated man files. Otherwise distribution-scripts and other package mantainers will need to deal with asciidocs+python dependency. I usually prefer to avoid committing generated files, but in this case I think it make sense.

Eventually the generated man files could go away, but to avoid blocking shards releases I would go that way.

Sounds good 👍 I was also hesitant about this too. But yeah maybe it's better to commit them (at least for now).

@straight-shoota
Copy link
Member Author

Building man pages in CI is not an issue. We could use that for validation to ensure the rendered pages are up to date. But I'd leave that for a follow-up. Priority is to get this merged to avoid falling out of sync again.

Copy link
Member

@bcardiff bcardiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should add a shards release checklist procedure to the "Crystal Release Checklist" doc in order to avoid forgetting to update the manpage upon release.

@straight-shoota straight-shoota merged commit 3c3b016 into crystal-lang:master Feb 1, 2021
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.

None yet

5 participants