You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just accidentally registered two subs with the same name.
Re-frame did warn me that I was overwriting the handler, but I did not notice the warning. I use Figwheel, and I get a pile of these warning every time I save a file. I've learned to ignore them. This time, I was warned, but it was one real warning buried in many irrelevant ones.
Is there any way, even if dirty, that the tooling can play with file loading or Figwheel, or something, and give a louder warning when a sub has been defined twice in a single load. (Even if this limited to only catching duplicates that are in the same file, this would still be enough to catch most real cases -- for most developers, I'd imagine that handlers that share a namespace are usually in the same file).
The text was updated successfully, but these errors were encountered:
This is related to #204 and #413. However at the time I wrote #413 I couldn't see an easy way to warn about "real" handler overwrites vs. figwheel reloading. I decided that because the warnings would show up when you reloaded the file, that would be enough. If/once #413 gets merged this will quiet down the console, and help you tune in better to the warnings that do show up, though this one would only show when you reloaded the app in a fresh browser window. I'd be open to further extensions to this afterwards if they weren't too complicated, but this seems like a relatively rare case with an easyish way to detect it (reload the browser).
I just accidentally registered two subs with the same name.
Re-frame did warn me that I was overwriting the handler, but I did not notice the warning. I use Figwheel, and I get a pile of these warning every time I save a file. I've learned to ignore them. This time, I was warned, but it was one real warning buried in many irrelevant ones.
Is there any way, even if dirty, that the tooling can play with file loading or Figwheel, or something, and give a louder warning when a sub has been defined twice in a single load. (Even if this limited to only catching duplicates that are in the same file, this would still be enough to catch most real cases -- for most developers, I'd imagine that handlers that share a namespace are usually in the same file).
The text was updated successfully, but these errors were encountered: