.Renviron activation in rig proj: handling project secrets and Posit Assistant restrictions

Aperta
#518 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #519 di @gaborcsardi — integrata

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
r

Direzione di ricerca

The discussion concerns how rig proj activates a committed project .Renviron through .rvenvlib/rvenv and the .onLoad() re-read of ~/.Renviron. Read those files and the linked discussion #514 to see the current design and why .Rprofile was avoided. Done means a maintainer decision on project-level secrets (for example a gitignored .Renviron.local) or a documented recommended pattern, not a code change alone.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Discussed in https://github.com/r-lib/rig/discussions/514

Originally posted by thedbcooper November 12, 2026
Hi team,

First off, thank you for all the recent updates to rig—the new rig proj workflows, user-level installs, and file-cloning library support have been huge improvements for managing R projects.

Reading through .rvenvlib/rvenv, the rationale for using a committed .Renviron (and R_DEFAULT_PACKAGES) instead of .Rprofile to avoid shadowing ~/.Rprofile—while still re-reading ~/.Renviron in .onLoad()—makes a lot of sense.

However, committing a project-level .Renviron still creates two practical friction points:

  1. Project-level secrets vs. .gitignore: While user-level ~/.Renviron is preserved, teams that keep project-specific secrets or API keys in ./.Renviron normally .gitignore it, which conflicts with rig expecting .Renviron to be committed for activation.
  2. AI tooling restrictions: Tools like Posit Assistant block reading .Renviron by default to prevent secret leaks, which prevents them from seeing how the rig environment is wired up when debugging or working with an assistant.

A few possible directions to consider:

  • Documenting a recommended pattern for project-level secrets (e.g., using a gitignored .env loaded via dotenv / readRenviron(".env"), or keyring).
  • Having rvenv also source a gitignored .Renviron.local alongside ~/.Renviron, so teams have a dedicated, untracked place for project-specific env vars.
  • Coordinating with Posit Assistant (or documenting how assistants should inspect rig project config without needing .Renviron).

Are there any plans or recommended patterns for handling this?

Thanks again for all the great work on rig proj!

Lingua principale
Rust
Stelle
1k
Fork
41
Merge medio
9h 33m
PR unite (30g)
17

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di r-lib/rig

Tutte le issue di r-lib/rig

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.