malformed DESCRIPTION error when trying to install git remote by tag

Open
#767 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
tooling

Research direction

Reproduce the failure with pak::pkg_install() using the tagged and untagged Codeberg URLs, then compare the linked DESCRIPTION files and consult the pak package-source documentation. Trace how the git tag is fetched and how DESCRIPTION is read; done means the v0.0.1 tag installs without the malformed DESCRIPTION error.

Written by the indexing model from the issue text.

Description

reprex

I'm trying to install an R package I host on Codeberg in a new R 4.5 install with {pak}. I thought that the best way to install the only tagged "release" of the package would be to specify the tag label in the pkg_install() call, like so:

pak::pkg_install("git::https://codeberg.org/pjphd/catchup.git@v0.0.1")

However, this errors with

Error: 
! error in pak subprocess
Caused by error in `read.dcf(con)`:
! Line starting 'catchup/DESCRIPTION ...' is malformed!
---

Curiously, if I just install the latest dev version with pak::pkg_install("git::https://codeberg.org/pjphd/catchup.git"), it works just fine and installs the 0.0.1.9000 version.

The only difference between the DESCRIPTION in the tagged "v0.0.1" commit and the latest commit is the ".9000" at the end of the version number in the Version field, so it's unclear to me why it's considered "malformed" in the tagged commit.

I'm sure I'm missing something obvious here, but from the error message and looking at the package sources docs, I really can't see why this is going wrong. Any pointers appreciated.

R version: 4.5.0
pak version: 0.8.0.2
Platform: Fedora 42

Dominant language
C
Stars
821
Forks
88
Avg merge
17m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pak

All issues in r-lib/pak

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.