CredoHotUpgrades.Check.ProcessDictionaryState (CredoHotUpgrades v1.0.0)

Copy Markdown View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

This check has a base priority of normal and works with any version of Elixir.

Explanation

code_change/3 sees and returns the state a GenServer callback holds, and nothing else. A value kept with Process.put/2 is not part of that state, is never passed to code_change/3, and is not migrated by a hot upgrade: it stays exactly as an earlier callback left it, under the new code, until something in the new code overwrites it or the process restarts.

Keep anything a later release might need to reshape in the state a callback returns, not the process dictionary.

Check-Specific Parameters

There are no specific parameters for this check.

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.