-
Notifications
You must be signed in to change notification settings - Fork 532
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
Fail CI builds with a better error when APIs are unexpectedly changed #5993
Conversation
how does this fail the build? its not obvious to me |
See this failure for an example: https://dev.azure.com/fluidframework/public/_build/results?buildId=23606&view=logs&j=3dc8fd7e-4368-5a92-293e-d53cefc8c4b3&t=c32d47e1-65cf-544f-3c15-66e3d2029546 |
The example is useful, but i still don't see how it does it, like what is the mechanism, build:docs:ci looks to be the same a build doc, but somehow that one fails the build |
"build:compile": "concurrently npm:tsc npm:build:esnext", | ||
"build:docs": "api-extractor run --local && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../_api-extractor-temp/", | ||
"build:docs:ci": "api-extractor run", | ||
"build:docs:ci": "api-extractor run && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh. is it just the lack of the --local right here?
I misunderstood your question. Sorry! The only difference between the docs CI and the local docs builds is that the
|
packages/dds/map/src/interfaces.ts
Outdated
* value is whatever params the ValueType needs to complete that operation. Similar to ISerializableValue, it is | ||
* serializable via JSON.stringify/parse but differs in that it has no equivalency with an in-memory value - rather | ||
* it just describes an operation to be applied to an already-in-memory value. | ||
* @alpha | ||
*/ | ||
export interface IValueTypeOperationValue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChumpChief With the deprecation and removal of ValueTypes, can this interface be completely removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no - Sequence still uses MapKernel to use valuetypes and we don't have a plan in place to change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yuck. OK. We'll make sense of this as part of API review. :)
Now that we're failing builds due to unexpected public API changes, the package build scripts have been updated to do a local docs build so that API reports are updated when devs run local builds. This changes fluid-build to enforce this new structure and fixes all the incorrect scripts.
This PR adds a new CI-specific npm script,
npm run build:docs:ci
, that will fail the build with a (somewhat) more helpful error like this:Running
npm run build:docs
locally will update the API report and output a warning like this: