Fail with R-tailored error when R content lacks a manifest.json#70
Merged
Conversation
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>
nealrichardson
commented
Jul 21, 2026
nealrichardson
commented
Jul 21, 2026
Co-authored-by: Neal Richardson <neal.p.richardson@gmail.com>
|
Preview deployed to Connect ( Deployed from commit 02ca837. |
|
Cleaned up 1 preview bundle(s) on http://localhost:3942: 8 |
|
Preview deployed to Connect ( Deployed from commit 02ca837. |
|
Cleaned up 1 preview bundle(s) on http://localhost:3941: 8 |
|
Preview deployed to Connect ( Deployed from commit 02ca837. |
|
Cleaned up 1 preview bundle(s) on http://localhost:3940: 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Deploying an R project (with
renv.lock) without amanifest.jsonfailed with a Python-specific error fromgenerate-requirements.sh:The action effectively assumed Python content whenever
manifest.jsonwas absent, producing a misleading message that pointed R users towarduv/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'sapp_mode, fetched in the "Determine app type" step. That step runs beforegenerate-requirements.sh, so gating there fails fast with a clear message and never reaches the Python path.resolve_app_typenow recognizes R app modes (shiny,rmd-shiny,rmd-static,api) and raises an R-tailored error explaining that R content must be deployed from amanifest.jsongenerated viarsconnect::writeManifest(). A presentmanifest.jsonstill short-circuits, so the supported R deploy path works unchanged.Notes
generate-requirements.shis untouched — its "no sources" error is now only reachable for genuinely Python-shaped content, where the message is appropriate.quarto-staticstill maps toquarto(Connect renders R-or-Python Quarto itself);quarto-shinystill falls through unchanged as before.Tests
Added parametrized tests asserting each R mode errors with R/
manifest.json/writeManifestguidance and nouv/pyprojectmention, plus a test that a manifest still deploys R content. All 60 non-network unit tests pass.Fixes #69
🤖 Generated with Claude Code