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

Deterministic output for doc types #76890

Merged
merged 2 commits into from
Sep 8, 2020

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Sep 7, 2020

Summary

tsc with incremental builds enabled generates non-deterministic types microsoft/rushstack#1958
To make resulting API docs predictable, I did:

@elastic/kibana-app-arch FYI

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 v7.10.0 labels Sep 7, 2020
@mshustov mshustov requested a review from a team as a code owner September 7, 2020 15:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@mshustov mshustov added the release_note:skip Skip the PR/issue when compiling release notes label Sep 7, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Comment on lines +4 to 5
"incremental": false,
"declaration": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to understand, if it's only impacting types / doc generation, why isn't this single change enough?

Copy link
Contributor Author

@mshustov mshustov Sep 8, 2020

Choose a reason for hiding this comment

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

incremental: false here fixed the problem only for types inferred within the project. However, logging.appenders unfolds to @kbn/config-schema type https://github.com/elastic/kibana/pull/76890/files#diff-66a08ea686ee74b5fa19fbb89c8c7803L366 @kbn/config-schema/tsconfig.json has incremental builds enabled. I decided that I'd rather specify an explicit type for this case than disable incremental builds for the @kbn/config-schema package.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, thanks for the explanation

@mshustov mshustov merged commit 2f1c012 into elastic:master Sep 8, 2020
@mshustov mshustov deleted the deterministic-output-for-docs branch September 8, 2020 11:28
mshustov added a commit to mshustov/kibana that referenced this pull request Sep 8, 2020
* disable incremental builds for public type generation.

They generate non-deterministic types microsoft/rushstack#1958

* do not infer public types
mshustov added a commit that referenced this pull request Sep 8, 2020
* disable incremental builds for public type generation.

They generate non-deterministic types microsoft/rushstack#1958

* do not infer public types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants