fix(cli): include config file in invalid workspace version error#34835
fix(cli): include config file in invalid workspace version error#34835puneetdixit200 wants to merge 2 commits into
Conversation
Deno Individual Contributor License AgreementThe following contributors need to sign the CLA before this PR can be merged: Click here to review and sign the CLA | Re-run CLA check This is an automated message from CLA Assistant |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Please sign the CLA |
|
Update: the upstream improvement is now in too. When I first looked at this, the All three have now happened:
So for the reported |
deno_semver 0.10.1 (denoland/deno_semver#54) replaces the generic "Unexpected character." parse error with a descriptive message naming the missing component (e.g. "Missing patch version. Versions must be in the form MAJOR.MINOR.PATCH (ex. 1.0.0)."). This delivers the upstream diagnostic improvement that was the stretch goal of denoland#27226. Updates the workspace-member test to assert the new message.
Closes #27226.
This adds config-file context when a workspace member version fails semver parsing. For the reported
version: "1.0"case,deno lintnow reports which memberdeno.jsonccontains the invalid version instead of only showing the semver parser error.A focused unit test covers the workspace-member conversion error text and preserves the underlying semver diagnostic.
Testing:
PATH="$PWD/target/debug:$PATH" ./x fmtgit diff --checkPATH="$PWD/target/debug:$PATH" ./x lint-jscargo fmt -p deno --checkcargo test --manifest-path /Users/deepakkudi23/ai-contrib-new-105/work/deno/Cargo.toml -p deno args::test::config_to_deno_graph_workspace_member_invalid_version_error(run from/tmpto avoid repo-local macOS linker flags)target/debug/deno linton a workspace member usingversion: "1.0"; it now includes the member config file URL in the error.Notes:
./x lintdid not complete locally. One run exhausted local disk while growingtarget/; after freeing incremental build artifacts, the repo-root clippy path failed before reaching this patch because this local Apple clang rejects the repo-local-fuse-ld=lldmacOS rustflag./tmpavoided that linker flag, but failed on the existingruntime/tokio_util.rsmetrics_enabledunused-variable warning under-D warnings, outside this patch.AI/LLM assistance disclosure: