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

Add features for partial invalidation #608

Merged
merged 8 commits into from Feb 24, 2021
Merged

Add features for partial invalidation #608

merged 8 commits into from Feb 24, 2021

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Feb 24, 2021

Invalidating all of the caches -- definition builder cache, method builder cache, and ancestor cache -- makes interactive RBS access really slow. This pull request adds some features to implement partial cache invalidation.

  • AncestorGraph calculates descendant classes/modules/interfaces of a class/module/interface, that allows identifying a set of types to be invalidated.
  • Environment#reject allows removing declarations from environments.


def initialize: (env: Environment) -> void

def only_ancestors!: (?bool only) -> self
Copy link
Member Author

Choose a reason for hiding this comment

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

[Goodcheck] Prefer boolish over bool for method arguments and block return values (view)

See the doc below:
https://github.com/ruby/rbs/blob/78d04a2db0f1c4925d2b13c2939868edf9465d6c/docs/syntax.md#bool-or-boolish

Rule
rbs.prefer_boolish

You can close this issue if no need to fix it. Learn more.

I closed this issue, because:

  • When you strictly want true | false.

@soutaro soutaro merged commit 448b67a into master Feb 24, 2021
@soutaro soutaro deleted the invalidation branch February 24, 2021 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant