Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

What happens to your manual edits when you run a code generator again?

Description and use

When rerunning Jostraca, manual edits may be lost, preserved, or merged. Overwrite removes edits; merge keeps them if changes are on different lines.

Problem

When a code generator is rerun, manual edits to generated files may be lost, preserved, or merged, leading to uncertainty about file consistency.

Outcome

Jostraca correctly implements both overwrite and merge behaviors as documented. Overwrite removes manual edits; merge preserves them when changes are on different lines.

Workflow

  • Generate initial file with Jostraca.
  • Manually edit the file (add DEBUG=1).
  • Re-run generator with overwrite policy (write:true, merge:false).
  • Re-run generator with merge policy (write:true, merge:true).

Evidence

I tested version 0.39.0 with a small configuration file, comparing overwrite and merge behaviour after adding a manual change. Both cases worked as documented.

Source

After regeneration: PORT=9090 HOST=localhost

Source

The resulting file contained: PORT=9090 HOST=localhost DEBUG=1

Source

The documentation describes a three-way merge using the previous generated version as a baseline.

Source

  • Record date: 2026-10-14T13:41:05.662Z