Conversation
Two links of one chain, both in the package job because it already paid for the build they need. The first asks whether binding.d.cts still says what the Rust says: that file is generated and committed, and a committed generated file can go stale, which ships types describing a function that is no longer there. The second asks whether etc/zudb.api.md still says what binding.d.cts says, so a change to what this package exports arrives as a diff in one small file somebody reads rather than as a line buried in six hundred generated ones. What the report leaves out is written into the workflow beside it. api-extractor reads declarations rather than the type checker's merged view, so it does not follow the module augmentation in zudb.d.cts and misses stream and Symbol.asyncDispose on Connection. Those two are held from the other side, by the fixtures under test/types that call both and are compiled under the settings a user's compiler would use. The gate is validated the way the leak gates are: a renamed export has to fail it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two links of one chain, in the package job because it already pays for the build they need.
The first asks whether
binding.d.ctsstill says what the Rust says. That file is generated by the build and committed, and a committed generated file is one that can go stale: change a signature, forget to rebuild, and the package ships types describing a function that is no longer there. Nothing was checking that until now.The second asks whether
etc/zudb.api.mdstill says whatbinding.d.ctssays. The report is what api-extractor is for here: a change to what this package exports arrives as a diff in one small file somebody has to read, rather than as a line buried in six hundred generated ones. The report is committed,npm run check:apiverifies it, andnpm run check:api:updateis what you run when the change was intended.What the report leaves out is written into the workflow beside it rather than left to be discovered. api-extractor reads declarations rather than the type checker's merged view, so it does not follow the
declare moduleaugmentation inzudb.d.cts, andstreamandSymbol.asyncDisposeare missing fromConnectionin the report. Those two are held from the other side, by the fixtures undertest/typesthat call both and are compiled bycheck:typesunder the settings a user's compiler would use.Both gates are validated the way the leak gates in the last change were: a renamed export has to fail them, and the step that renames one puts the tree back before anything else looks at it.
projectFolderis spelled out inapi-extractor.jsonbecause there is notsconfig.jsonat the root to infer it from, andtools/api-extractor.tsconfig.jsonis the settings fromtest/typeswithskipLibCheckturned on, since this run is a reader rather than a checker.