Skip to content

Need a better Razor error compilation DX #72

@joelmartinez

Description

@joelmartinez

Artifact Storage and Cleaning Recommendation (2025-12-15):

For compiled template diagnostics and generated outputs, adopt this artifact storage plan:

  • Store Razor compilation artifacts in <docsRoot>/.chloroplast/artifacts/razor/.
  • Before each build or template compile run, delete the entire artifacts/razor/ directory so it always only contains results from the latest build.
  • Recreate the folder and write only the artifacts from the most recent run.
  • Add (if missing) a .chloroplast/.gitignore file with * so nothing in .chloroplast gets committed even if parent .gitignore is missing or incomplete.
  • Optionally, include a .chloroplast/README.txt explaining the folder is generated and safe to delete.

Rationale:

  • This ensures that build artifacts are easy to discover and examine—paths in error messages are meaningful and local.
  • Users are protected from accidental check-ins (and don’t have to manage growing disk usage).
  • No unique “run id” or timestamp folders required; always the latest build's output, for predictable navigation and debugging.
  • No need for optional flags or configuration—it's safe to be opinionated and automatic.

Acceptance Criteria

  • razor compilation errors should have actionable information, which means the user should be able to clearly see the file location/path to pull up the generated file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions