Skip to content

Introduce MIGRATION warnings #686

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

Merged
merged 1 commit into from
Mar 8, 2019
Merged

Introduce MIGRATION warnings #686

merged 1 commit into from
Mar 8, 2019

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Mar 7, 2019

This adds the concept of "MIGRATION warnings" that are specifically
around migrating to Asciidoctor. By default these warnings are only
enforced against the "latest" version of each book where "latest" is the
first version listed in the branches list. The idea is that we'd like
"modern" versions of the documentation to be fully Asciioctor
compatible but that we won't be able to do that overnight and that we
won't be able to modify very old documentation to be compatible and we
will forever rely on the compatibility layer in branches that are not
actively being developed.

This only adds a single MIGRATION warning, emitted when the start of a
code block doesn't match the end of a code block. These are very simple
to fix and we can fix them before migrating the book to Asciidoctor.

In future work we'll want to emit MIGRATION warnings when we use the
"old" style for things like the beta[] macro. Since the "new" style
is not compatible with Asciidoc the order of operations has to be:

  1. Switch the book to Asciidoctor, suppressing the warnings for beta[]
  2. Migrate all usages of the beta[] macro to the new beta::[] style.
  3. Remove the suppression.

This change doesn't have a way to suppress any MIGRATION warnings on
the latest version of the each book. As I said above, it always
suppresses them on older versions.

When you use ./build_docs --doc we can't tell whether you are building
the latest version of a book or an older version so we assume that you
are building the latest version. This is the most common thing. When you
build an older version you can do

./build_docs --suppress_migration_warnings --doc foo.asciidoctor

to suppress the MIGRATION warnings.

Begins work on #671

This adds the concept of "MIGRATION warnings" that are specifically
around migrating to Asciidoctor. By default these warnings are only
enforced against the "latest" version of each book where "latest" is the
first version listed in the `branches` list. The idea is that we'd like
"modern" versions of the documentation to be fully Asciioctor
compatible but that we won't be able to do that overnight and that we
won't be able to modify very old documentation to be compatible and we
will forever rely on the compatibility layer in branches that are not
actively being developed.

This only adds a single `MIGRATION` warning, emitted when the start of a
code block doesn't match the end of a code block. These are very simple
to fix and we can fix them before migrating the book to Asciidoctor.

In future work we'll want to emit `MIGRATION` warnings when we use the
"old" style for things like the `beta[]` macro. Since the "new" style
is not compatible with Asciidoc the order of operations has to be:
1. Switch the book to Asciidoctor, suppressing the warnings for `beta[]`
2. Migrate all usages of the `beta[]` macro to the new `beta::[]` style.
3. Remove the suppression.

This change doesn't have a way to suppress any `MIGRATION` warnings on
the latest version of the each book. As I said above, it *always*
suppresses them on older versions.

When you use `./build_docs --doc` we can't tell whether you are building
the latest version of a book or an older version so we assume that you
are building the latest version. This is the most common thing. When you
build an older version you can do
```
./build_docs --suppress_migration_warnings --doc foo.asciidoctor
```
to suppress the `MIGRATION` warnings.

Begins work on elastic#671
@nik9000 nik9000 requested review from a user and ddillinger March 7, 2019 23:33
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Invaluable.

@nik9000 nik9000 merged commit e04e0a2 into elastic:master Mar 8, 2019
@nik9000
Copy link
Member Author

nik9000 commented Mar 8, 2019

Thanks for reviewing @Jarpy!

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.

1 participant