microsoft/rushstack

[api-extractor] add option to remove line numbers from api reports?

phryneas opened this issue · 4 comments

Summary

Currently it's very annoying to get a "different api report" if any file has a new line added anywhere.
Essentially, the diff is most of the time:

-// src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
+// src/core/types.ts:179:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts

Would it be possible to add an option to remove/omit line numbers?
The error message here is pinning it down more than enough, pointing to the MutationQueryReducer symbol.

Standard questions

Question Answer
@microsoft/api-extractor version? 7.38.0
Operating system? irrelevant
API Extractor scenario? reporting
Would you consider contributing a PR? Yes
TypeScript compiler version? irrelevant
Node.js version (node -v)? irrelevant

Could you provide repro steps?

I don't see that problem in our own API reports, for example:

// @public
export class MarkdownDocumenterAccessor {
// Warning: (ae-forgotten-export) The symbol "IMarkdownDocumenterAccessorImplementation" needs to be exported by the entry point index.d.ts

That's very curious! I'll do some digging on monday!

Sorry, it took a while for me to get back to this.

The messages I am speaking about are triggered here:

unassociatedMessage.formatMessageWithLocation(collector.workingPackage.packageFolder)

It's the "Warnings were encountered during analysis:" section at the bottom of the file:

https://github.com/apollographql/apollo-client/blob/60b7e56c6e0593a66c4ffe9c38a6a71aede717f7/.api-reports/api-report-react_context.md?plain=1#L1627-L1649