roc-lang / roc-lang/basic-cli

Add `Path.absolute` or `Path.canonical`

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

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Rust
Stars
121
Forks
45
Avg merge
18h 43m
Merged PRs (30d)
10

Description

Hi, long time listener, first time problem-maker 😅. I am trying to build a simple CLI in roc and when I found the Path module I was hoping to convert a relative path to an absolute one but failed to find the functionality to do so? Did I miss it? Could it be added? (Would offer to try myself but I am painfully aware of my current skill level ☺️).

My expectation would be that it takes a string representing either a relative or absolute path and returns the absolute path. Java, I think distinguishes between "absolute" and "canonical" paths. To my understanding, the difference is the latter resolves syntax like ".." while the former would just include the ".." in the path. FWIW I personally prefer the latter's behaviour and the former's name.

Contributor guide

Open the contributing guide

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.

Research direction

Start with the Path module and review its existing path operations and platform entry points. Clarify whether the new API should provide absolute or canonical behavior, then verify that relative and absolute inputs produce the agreed absolute-path result.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.