roc-lang / roc-lang/path

Add reusable platform filesystem effect adapters

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

Nobody has claimed this yet.

enhancement
Dominant language
Roc
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Goal

Allow platforms such as basic-cli to reuse the shared Path type and common filesystem behavior while keeping hosted effects and platform-specific I/O errors in the platform. This should make it practical for basic-cli to depend on this package again instead of vendoring the path implementation.

Proposed direction

  • accept a platform effect provider through where constraints
  • keep raw Utf8/Unix-byte/Windows-unit conversion in this package
  • share path type, existence, file/directory predicate, and returned-path conversion logic
  • let each platform wrap its hosted functions and map its own error types
  • migrate basic-cli back to the shared roc-lang/path nominal type once the adapter API is ready

Compiler dependency

The provider design currently passes roc check but panics during lowering when an effectful and pure constraint share the provider. Track the compiler fix in roc-lang/roc#10311.

Follow-up scope

  • settle the provider API after roc-lang/roc#10311 is fixed
  • cover file and directory operations used by basic-cli
  • add a platform integration example/test
  • restore the roc-lang/path dependency in the basic-cli platform

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.

Research direction

Start by reviewing the proposed provider design and the existing platform behavior for basic-cli. Check that roc check and lowering handle providers shared by effectful and pure constraints, with roc-lang/roc#10311 as the compiler dependency. Done means the shared path and filesystem operations support a platform integration example or test and basic-cli can restore its roc-lang/path dependency.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.