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

Inspector: support IDeref #220

Open
vemv opened this issue Nov 27, 2023 · 3 comments
Open

Inspector: support IDeref #220

vemv opened this issue Nov 27, 2023 · 3 comments
Labels
enhancement Improvement to an existing feature

Comments

@vemv
Copy link
Member

vemv commented Nov 27, 2023

Custom objects implementing IDeref should be navigable to their derefed value.

The resulting UI should be equivalent to the atom one:

image

i.e. Contains wording, extra level of indentation.

@bbatsov bbatsov added the enhancement Improvement to an existing feature label Feb 21, 2024
@alexander-yakushev
Copy link
Member

The possible problem here could be if the IDeref object is not realized yet. It is arguable whether descending into an unrealized IDeref should trigger its evaluation.

It ie easier if the object also implements IPending and tells us it is realized.

@vemv
Copy link
Member Author

vemv commented Apr 19, 2024

We could also observe a flag passed from cider/cider-nrepl.

Another way to be cautious is to only deref if we're looking at a "leaf" so to speak - if we're inspecting an IDeref, we deref, but if the IDeref is merely an object within the inspected collection, we don't.

@vemv
Copy link
Member Author

vemv commented Apr 21, 2024

I gave this some hammocking and it would seem simple and easy to make down also mean "if the current element is an ideref, deref it".

That way users always see the ideref first, and can explicitly yet easily choose to deref it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants