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

Better filter mechanisms ("through filters") #73

Open
LinqLover opened this issue Mar 21, 2022 · 2 comments · May be fixed by #76
Open

Better filter mechanisms ("through filters") #73

LinqLover opened this issue Mar 21, 2022 · 2 comments · May be fixed by #76
Labels
discussion engineering Technical change to the machinery enhancement New feature or request

Comments

@LinqLover
Copy link
Collaborator

LinqLover commented Mar 21, 2022

While #19 has already been closed by #47, the convenience of the current filter mechanism is still very limited. In short, in some situations, users might want to hide only specific contexts, whereas, in other situations, they would want to hide all their callees, too. The current approach only supports the first use case.

Reconsidering different scenarios for filters:

  • composite sends (#allMorphsDo:)
  • #exampleShutDown (simple do:)
  • hide exceptions ((1 to: 3) do: [:x | x squared] displayingProgress: [:x | x asWords].) or execute around methods (#becomeActiveDuring:, see: Project current world doOneCycleNow) from stack
  • flatten (temporarily or by-design) inadequate hierarchies from source code

With the exception of the last (so far mainly fictive) scenario, a better filter mechanism would cut away contexts from the stack from the first filtered-away context (e.g., Morph>>#allMorphsDo:) up to (exclusively) the first block context whose home context was called outside of the filter. In other words, the filters should only be applied to the method context of stackframes ("through filters"). See Context>>#cut: for a comparable mechanism.

However, there is another (still much more elaborated) limitation of this approach: If the "evaluable" passed into e.g. a composite send is not a block, the focus on home contexts from above is too specific. E.g., for (1 to: 10) sorted: #asWords ascending or (aTdbTrace childrenForFilter: aTdbContextFilter), the filters would also hide Integer>>#asWords or TDBContextFilter>>#value:. To encounter this problem, some kind of tracking mechanism to determine the origin of an object would be required (see #74).

@LinqLover LinqLover added enhancement New feature or request engineering Technical change to the machinery discussion labels Mar 21, 2022
@LinqLover
Copy link
Collaborator Author

Another feature request regarding filters would be "hide all packages but package X".

LinqLover added a commit that referenced this issue Apr 29, 2022
@LinqLover LinqLover linked a pull request Apr 29, 2022 that will close this issue
6 tasks
@LinqLover
Copy link
Collaborator Author

Todo: Also think about allow-list instead of disallow-list filters (cf. #56)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion engineering Technical change to the machinery enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant