# `VirtualTimeUpgrade`
[🔗](https://github.com/d-led/gen_server_virtual_time/blob/v1.1.1/packages/gen_server_virtual_time_migrate/lib/virtual_time_upgrade.ex#L1)

Plans the move off the deprecated code-generator module names.

`ActorSimulation.CAFGenerator` and its five siblings became
`ActorSimulation.Codegen.*` in 1.1. The old names still work — they forward to
the new ones and warn — so this task is a convenience: it turns the warnings
into silence, and it never guesses.

What it rewrites:

  * a fully qualified reference, `ActorSimulation.CAFGenerator.generate(...)`;
  * `alias ActorSimulation.CAFGenerator` together with the bare
    `CAFGenerator.foo()` calls that follow it in the same file — but only when
    the name it would introduce, `CAF`, is not already used there.

What it leaves alone, and reports:

  * an alias with `as:`, which may be renamed to anything;
  * a file where the new short name is already in use, because then the two
    names would collide;
  * a bare short name no alias introduced: it may come from anywhere.

# `plan`

```elixir
@spec plan(String.t()) :: {:ok, VirtualTimeMigrate.Edits.plan()} | {:error, term()}
```

Plans the upgrade of one file's source.

Returns `{:error, reason}` when the source does not parse, so the caller can
report the file and carry on.

# `renames`

```elixir
@spec renames() :: %{required(String.t()) =&gt; String.t()}
```

The modules this task knows how to rename: old name → new name.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
