Add reusable platform filesystem effect adapters
Nobody has claimed this yet.
- 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
whereconstraints - 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-cliback to the sharedroc-lang/pathnominal 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/pathdependency in thebasic-cliplatform
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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