Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

handling nested list types

Open
#5 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Reproduce the panic by reading the shown rv.lock data with tomledit::read_toml() and tomledit::get_item(toml_data, "packages"). Start with src/to_robj.rs, then inspect the lockfile-related structures referenced from rv's src/lockfile.rs. Done means mixed string and nested-table dependency entries parse without the ExpectedString panic.

Written by the indexing model from the issue text.

Description

in rv's new lockfile format, we're capturing dependency constraints if they exist in the dependencies array

So a field can now look like:

[[packages]]
name = "gsm.app"
version = "2.4.0"
source = { git = "https://github.com/gilead-biostats/gsm.app", sha = "2bade6a78617abc9154f3c92117012260a5477b5", tag = "v2.4.0" }
force_source = true
dependencies = [
    "bslib",
    "cli",
    "dplyr",
    "favawesome",
    "glue",
    "gsm.core",
    "gsm.kri",
    { name = "gt", requirement = "(>= 0.11.1.9000)" },
    "htmltools",
    "htmlwidgets",
    "jsonlite",
    "magrittr",
    "purrr",
    "rlang",
    { name = "shiny", requirement = "(>= 1.6.0)" },
    "shinyjs",
    "shinyWidgets",
    "yaml",
]

and when calling tomledit get the following:

> toml_data <- tomledit::read_toml("rv.lock")
> tomledit::get_item(toml_data, "packages")

thread '<unnamed>' panicked at src/to_robj.rs:96:34:
called `Result::unwrap()` on an `Err` value: ExpectedString(list!(name=["gt"], requirement=["(>= 0.11.1.9000)"]))
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

so the parsing needs another layer.

here is a complete snippet from an rv.lock file with version 2 syntax:

# This file is automatically @generated by rv.
# It is not intended for manual editing.
version = 2
r_version = "4.4"

[[packages]]
name = "DBI"
version = "1.2.3"
source = { repository = "https://prism.dev.a2-ai.cloud/rpkgs/stratus/2025-04-26" }
force_source = false
dependencies = []

[[packages]]
name = "DT"
version = "0.33"
source = { repository = "https://prism.dev.a2-ai.cloud/rpkgs/stratus/2025-04-26" }
force_source = false
dependencies = [
    { name = "htmltools", requirement = "(>= 0.3.6)" },
    { name = "htmlwidgets", requirement = "(>= 1.3)" },
    "httpuv",
    { name = "jsonlite", requirement = "(>= 0.9.16)" },
    "magrittr",
    "crosstalk",
    "jquerylib",
    "promises",
]

[[packages]]
name = "Matrix"
version = "1.7-1"
source = { builtin = true }
force_source = false
dependencies = [
    "lattice",
]

if you want to see the src code for any reason to see the data/structures where toml stuff is being called on creation:

https://github.com/A2-ai/rv/blob/main/src/lockfile.rs#L327

Dominant language
R
Stars
14
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 extendr/tomledit

All issues in extendr/tomledit

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.