typelevel / typelevel/fs2

Support glob patterns in fs2-io.js

Open
#2,949 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Scala
Stars
2.5k
Forks
636
Avg merge
2d 4h
Merged PRs (30d)
7

Description

Opening this issue to track and see if anybody wants it. We didn't support it initially, because it requires JDK APIs not implemented in Scala.js..

https://github.com/typelevel/fs2/blob/a5566a6ff56fcba4f50896fdb32d54541f9c9ba5/io/shared/src/main/scala/fs2/io/file/Files.scala#L40-L41

However, Scala Native has re-implemented globs in pure Scala. So in theory we should be able to inline that code and support it as well. Should be pretty easy, just a non-trivial amount of code to take on.

https://github.com/scala-native/scala-native/blob/b8e4dcc02c949716b51964f1e2f27453ff49a096/javalib/src/main/scala/java/nio/file/PathMatcherImpl.scala

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 referenced Files.scala location to understand the current glob limitation, then compare Scala Native's javalib/src/main/scala/java/nio/file/PathMatcherImpl.scala implementation. Determine how that implementation can be incorporated for Scala.js and verify that fs2-io.js supports glob patterns without relying on unavailable JDK APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.