Add reusable platform filesystem effect adapters

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か

調査の方向性

まず、提案されているprovider設計と、basic-cliに対する既存のプラットフォームの動作を確認します。roc checkとloweringが、effectfulおよびpureの制約で共有されるproviderを処理できることを確認してください。コンパイラの依存関係はroc-lang/roc#10311です。共有パスとファイルシステム操作がプラットフォーム統合の例またはテストをサポートし、basic-cliがroc-lang/path依存関係を復元できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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
主要言語
Roc
スター
7
フォーク
1
平均マージ
22時間 42分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Operating Systems の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。