跳到主要內容

ARC 2.0.0-beta.25

Generate, lint, and migrate

Keep DSL source readable, validate its meaning, and materialize JSON only when a compatibility consumer needs it.

These commands answer different questions. A green command is useful evidence, but it is not a substitute for running the app in its intended renderer.

bash
arc dsl format ./hello-aup --write
arc dsl lint ./hello-aup
arc dsl validate ./hello-aup
arc dsl generate ./hello-aup --check

Read each result correctly

CommandWhat it examinesDoes it write?What a green result does not prove
format --writeDSL source formattingYesThat the source is valid or runnable
format --checkWhether formatting would change filesNoThat generated artifacts are current
lintAuthoring-level DSL problemsNoThat the full app configuration and target renderer agree
validateParsed DSL/configuration semanticsNoThat a browser/device presents the intended interaction
generate --checkWhether compatibility artifacts would changeNoThat a source-first app must keep JSON on disk
generate --writeThe same artifactsYesThat the generated app passed a runtime acceptance test

On a fresh minimal-app scaffold in ARC 2.0.0-beta.25, format --write rewrites three DSL sources. format_changed is the diagnostic from format --check when formatting would alter files; it is not the normal success result of the --write command.

Treat generated JSON as compatibility work

DSL-first apps can expose compatible JSON virtually. A project only needs physical JSON when a specific compatibility consumer asks for materialized files. Use the following decision order:

  1. Keep the .aup source authoritative.
  2. Run generate --check in CI or before handing the project to a consumer that expects generated files.
  3. Run generate --write only when that consumer actually needs the physical artifact, then review the diff like any other derived output.
  4. Do not delete a JSON-first app merely to make it look DSL-first; JSON remains a supported source form.

For an AUP app configuration, a present .aup/app.aup takes precedence. If it is absent, ARC can read .aup/app.json as source. If the DSL file exists but is invalid, ARC fails rather than silently falling back to old JSON. That makes an invalid source visible instead of masking it with a stale artifact.

Use a narrow migration loop

When converting an existing source, do not change source language, UI behavior, and deployment boundary in one step:

  1. Format, lint, and validate the current source.
  2. Generate in check mode and inspect what would differ.
  3. Materialize only if a real downstream consumer needs it.
  4. Run arc blocklet check for the declared profile, then run the blocklet locally and inspect the actual target.

See CLI diagnostics for the command boundary and Sources, artifacts, and JSON compatibility for loader priority.