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

DataResolver is a little noisy on application startup #458

Closed
agrobbin opened this issue May 13, 2023 · 5 comments
Closed

DataResolver is a little noisy on application startup #458

agrobbin opened this issue May 13, 2023 · 5 comments
Labels
bug Something isn't working v2.x Issues/PRs that affect the v2.x line of releases

Comments

@agrobbin
Copy link
Contributor

Describe the bug

I'm not sure when this started happening, but I recently noticed some output on application startup (across seemingly all environments) from Lookbook. For each parameter with Ruby code in it:

# @param size [Symbol] select {{ UI::CardComponent::SIZES.keys }}

We're seeing this output in our application startup logs, coming from DataResolver#evaluate:

Data cannot be evaluated (Input: 'UI::CardComponent::SIZES.keys ')

To Reproduce

Write a component preview with a parameter that has evaluated Ruby, then start the server!

Expected behavior

There should be no output on application startup.

Version numbers

Please complete the following information:

  • Lookbook: 2.0.2
  • ViewComponent: 3.0.0
  • Rails: 7.0.4.3
  • Ruby: 3.2.2
@agrobbin agrobbin added the bug Something isn't working label May 13, 2023
@allmarkedup allmarkedup added the v2.x Issues/PRs that affect the v2.x line of releases label May 16, 2023
@allmarkedup
Copy link
Collaborator

Thanks @agrobbin, good spot - it's due to a change I made in the 2.0.2 release that has resulted in some up-front data resolving happening that shouldn't be. Will get a fix up and out in the next release 👍

@allmarkedup
Copy link
Collaborator

Okay this should be fixed now in #468 - will go out in the next release if everything looks okay :-)

@agrobbin
Copy link
Contributor Author

Great, thanks for the quick resolution @allmarkedup!

@allmarkedup
Copy link
Collaborator

I've just released the fix for this in 2.0.3 so I'm going to go ahead and close this down now. Thanks for bringing it to my attention @agrobbin :-)

@agrobbin
Copy link
Contributor Author

Much quieter, thanks @allmarkedup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.x Issues/PRs that affect the v2.x line of releases
Projects
None yet
Development

No branches or pull requests

2 participants