Skip to main content

Module migrate

Module migrate 

Source
Expand description

Moving an install that predates the one-directory layout into it.

Before ~/.eclipse, an install put its files in three places — the binaries wherever --prefix said, config in $XDG_CONFIG_HOME/eclipse, machine-written files in $XDG_STATE_HOME/eclipse — and remembered nothing about the workspace. That is the mess this moves out of, once.

Two rules, because this touches somebody’s files:

  • Plan first, move second. plan returns the exact list of moves and touches nothing. eclipse migrate --dry-run prints it; the automatic pass at startup applies it. One implementation, so what you previewed is what happens.
  • Never overwrite, never merge blindly. If the destination exists, that entry is skipped and named in the report. A migration that quietly merged two config.toml files would be worse than one that refused.

The memory files are the one place a file changes directory semantics: AGENT.md, USER.md and MEMORY.md used to sit beside config.toml and now live in memory/, so they move as a group with their names intact.

Structs§

Legacy
Where the old layout put things.
Plan
Everything the old layout holds that the new one should have.
Step
One move: what, from where, to where, and whether it happens.

Functions§

apply
Do it. Returns one line per step: what moved, what was kept and why, what failed.
legacy
The old paths for this environment, when they can be worked out at all.
plan
Work out what to move without touching anything.
run
Plan, apply and tidy in one call: what the automatic pass and eclipse migrate both run, so there is one implementation of “what migrating means” and the two cannot drift.
tidy
The old directories, once emptied, are removed if nothing is left in them — an empty ~/.eclipse would otherwise be exactly the confusion this migration exists to end. A directory still holding something unknown is left alone, and said so.