Skip to content

Commit

Permalink
reserved names + coc (#65)
Browse files Browse the repository at this point in the history
* reserved names + coc

* Document why package collisions need to be avoided
  • Loading branch information
maelle authored Dec 9, 2024
1 parent 4029f80 commit e234813
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ book:
- publish/set-up.qmd
- publish/metadata.qmd
- publish/debug-build.qmd
- publish/terms.qmd
- publish/other-networks.qmd
lightbox: true
format:
Expand Down
48 changes: 48 additions & 0 deletions publish/terms.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Package publishing rules"
---

## Avoid name collisions

While it is technically possible to host a fork or completely different package with the same name in a universe,
we strongly recommend your **not** doing it.

- An user might mistakenly install the `example` package from CRAN rather than the version from an universe.
R will automatically overwrite one package with the other when running `install.packages()` or `update.packages()`.
- It becomes even trickier when other packages import the package.

Therefore, when two packages have the same name, and one of them is on CRAN, R-universe:
- treats the one that is on CRAN as the official version.
- warns users against the duplication on the page of the other package.

## Reserved names

The following names should be avoided as package name because `https://username.r-universe.dev/{pkg}/` has special meaning:

- api
- apis
- articles
- badges
- bin
- builds
- citation
- contributors
- datasets
- docs
- favicon.ico
- feed.xml
- index.xml
- manual
- packages
- readme
- robots.txt
- sitemap_index.xml
- sitemap.xml
- src
- stats

## Code of Conduct

Maintainers of universes are solely responsible for their projects.

The R-universe project itself is governed by the [rOpenSci code of conduct](https://ropensci.org/code-of-conduct/).

0 comments on commit e234813

Please sign in to comment.