Skip to content

Fail with R-tailored error when R content lacks a manifest.json#70

Merged
nealrichardson merged 2 commits into
mainfrom
claude-issue-69
Jul 21, 2026
Merged

Fail with R-tailored error when R content lacks a manifest.json#70
nealrichardson merged 2 commits into
mainfrom
claude-issue-69

Conversation

@nealrichardson

Copy link
Copy Markdown
Contributor

Problem

Deploying an R project (with renv.lock) without a manifest.json failed with a Python-specific error from generate-requirements.sh:

No uv.lock or pyproject.toml file found. Please run 'uv sync' ...

The action effectively assumed Python content whenever manifest.json was absent, producing a misleading message that pointed R users toward uv/pyproject.toml.

Fix

Rather than sniffing files (renv.lock, .R, DESCRIPTION, …), this uses the signal the architecture already treats as authoritative: the Connect content record's app_mode, fetched in the "Determine app type" step. That step runs before generate-requirements.sh, so gating there fails fast with a clear message and never reaches the Python path.

resolve_app_type now recognizes R app modes (shiny, rmd-shiny, rmd-static, api) and raises an R-tailored error explaining that R content must be deployed from a manifest.json generated via rsconnect::writeManifest(). A present manifest.json still short-circuits, so the supported R deploy path works unchanged.

Notes

  • generate-requirements.sh is untouched — its "no sources" error is now only reachable for genuinely Python-shaped content, where the message is appropriate.
  • quarto-static still maps to quarto (Connect renders R-or-Python Quarto itself); quarto-shiny still falls through unchanged as before.

Tests

Added parametrized tests asserting each R mode errors with R/manifest.json/writeManifest guidance and no uv/pyproject mention, plus a test that a manifest still deploys R content. All 60 non-network unit tests pass.

Fixes #69

🤖 Generated with Claude Code

Deploying R content without a manifest.json fell through to the Python
requirements path and failed with a confusing uv.lock/pyproject.toml
error. Detect R app_modes (shiny, rmd-shiny, rmd-static, api) from the
Connect content record in resolve-app-type -- which runs before
generate-requirements.sh -- and fail fast with a message pointing to
rsconnect::writeManifest(). A present manifest.json still short-circuits,
so the supported R path works.

Fixes #69

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread src/connect_actions/apptype.py Outdated
Comment thread CLAUDE.md Outdated
Co-authored-by: Neal Richardson <neal.p.richardson@gmail.com>
@github-actions

Copy link
Copy Markdown

Preview deployed to Connect (localhost:3942): http://localhost:3942/connect/#/apps/7dca87a4-5ed8-41e5-ab80-acada587f19a/draft/8

Deployed from commit 02ca837.

@github-actions

Copy link
Copy Markdown

Cleaned up 1 preview bundle(s) on http://localhost:3942: 8

@github-actions

Copy link
Copy Markdown

Preview deployed to Connect (localhost:3941): http://localhost:3941/connect/#/apps/2b0bec23-6a2b-487f-90bf-af2b5cf946bb/draft/8

Deployed from commit 02ca837.

@github-actions

Copy link
Copy Markdown

Cleaned up 1 preview bundle(s) on http://localhost:3941: 8

@github-actions

Copy link
Copy Markdown

Preview deployed to Connect (localhost:3940): http://localhost:3940/connect/#/apps/d9255449-d43f-498c-b4ed-bf7efc59961a/draft/8

Deployed from commit 02ca837.

@github-actions

Copy link
Copy Markdown

Cleaned up 1 preview bundle(s) on http://localhost:3940: 8

@nealrichardson
nealrichardson merged commit 8cb5ac2 into main Jul 21, 2026
6 checks passed
@nealrichardson
nealrichardson deleted the claude-issue-69 branch July 21, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better error when no manifest.json: don't assume Python content

1 participant