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

Introduce orchard.inspect/nav-to-item #213

Closed
wants to merge 1 commit into from
Closed

Introduce orchard.inspect/nav-to-item #213

wants to merge 1 commit into from

Conversation

vemv
Copy link
Member

@vemv vemv commented Nov 12, 2023

Closes #209

(keep (fn [[k v]]
(or (some->> (nav obj k v)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note the deletion of nav, explained in the comment below.

I'd say it was a bug - deftests were showing that we were performing nav over the same items repeatedly, which can be expensive in the face of side-effects.

@@ -941,32 +958,6 @@
(:newline))
(datafy-section rendered))))))))

(deftest inspect-navigable-metadata-extension-test
Copy link
Member Author

Choose a reason for hiding this comment

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

Test deleted as it was based on eagerly calling nav.

The added test already shows the behavior for when calling nav intentionally.

@vemv vemv requested a review from bbatsov November 12, 2023 08:36
@vemv vemv marked this pull request as draft November 12, 2023 13:04
@vemv
Copy link
Member Author

vemv commented Nov 12, 2023

Hmm, the basic idea works but this will need some refinements since the index has some edge cases.

@vemv vemv closed this Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspector: add op to nav a sub-item
1 participant