Skip to content

build: do not merge interface members with class API members #18088

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

Conversation

devversion
Copy link
Member

Currently we always merge all members defined by interfaces
into the members of Dgeni class API documents. This causes optional
interface members to show up even if they are not implemented.

To fix this, the member merging processor has been reworked to
not even ever consider interfaces for the API docs and to handle mixins
defined through intersection types. Only members which are actually
defined/inherited should show up in the API docs.

Merging properties of interfaces was done in the past to handle mixins, but
this is no longer needed and its generally wrong to merge properties from interfaces..

Fixes #17148. Fixes #18014.

@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Jan 2, 2020
@devversion devversion requested a review from a team as a code owner January 2, 2020 13:11
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 2, 2020
Currently we always merge _all_ members defined by interfaces
into the members of Dgeni class API documents. This causes optional
interface members to show up even if they are not implemented.

To fix this, the member merging processor has been reworked to
not even ever consider interfaces for the API docs. Instead, only
members which are "extended" should show up. Support for mixins using
intersection types has been added.

Fixes angular#17148. Fixes angular#18014.
@devversion devversion changed the title build: do merge interface members with class API members build: do not merge interface members with class API members Jan 2, 2020
@devversion devversion force-pushed the build/docs-do-not-show-interfaces branch from e1c2b8b to 5c32105 Compare January 2, 2020 13:11
@devversion
Copy link
Member Author

Note: This logic could also be useful in the future if we combine our API docs logic with the one from aio. We need a way to handle mixins unless we remove them in our code-base. The new code is more future-proof as it does not require merging of interface members.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 10, 2020
@mmalerba mmalerba merged commit a909f81 into angular:master Jan 10, 2020
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
…#18088)

Currently we always merge _all_ members defined by interfaces
into the members of Dgeni class API documents. This causes optional
interface members to show up even if they are not implemented.

To fix this, the member merging processor has been reworked to
not even ever consider interfaces for the API docs. Instead, only
members which are "extended" should show up. Support for mixins using
intersection types has been added.

Fixes angular#17148. Fixes angular#18014.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
4 participants