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

Remove unstrument from malli.dev.cljs/start - favor hot reloading #703

Merged
merged 1 commit into from
May 17, 2022

Conversation

dvingo
Copy link
Contributor

@dvingo dvingo commented May 6, 2022

This was pointed out in this issue #695
That during (cljs) development if you're changing function definitions in a leaf namespace and do not re-eval the entry namespace where malli.dev.cljs/start! is called then you will get stale function values. This is because instrument captures the value of the function. The steps are:

  1. instrument captures value of function, stores it in an atom.
  2. developer changes definition of function (and code is hot-reloaded)
  3. dev/start! runs and set!s previous function value from step 1.
  4. developer is confused and code is broken.

So effectively hot reloading already is unstrument.

@ikitommi ikitommi merged commit e0d9d6a into metosin:master May 17, 2022
@ikitommi
Copy link
Member

Thanks!

@dvingo dvingo deleted the more-cljs-instrument-fixes branch May 5, 2023 16:12
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.

2 participants