nodejs / nodejs/node

Tracking issue: `std::filesystem::path` headaches, and breakage on Windows with non-ASCII paths

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

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

fs never-stale windows
主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

Version

v24.1.0

Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem

No response

What steps will reproduce the bug?

Couldn't find a tracking issue for this one.

There are places in the source that handle std::filesystem::path objects, and on Windows, this involves conversion between UTF-8 strings and wchar-based paths. This can lead to path corruption, as previously discussed.

One example of this is #56049, which has an open PR to fix this specific usage. However, #58764 has just been reported, which affects a completely different area of the API. There are other examples of usage elsewhere in the source.

It feels like this probably needs a library-wide approach – even if not removing std::filesystem::path entirely as previously discussed, then at least some sort of internal wrapper API to abstract out potential footguns.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず #56049 と #58764 を確認し、その後、ソース内で std::filesystem::path の他の使用箇所を検索してください。これらの例を含む影響を受ける使用箇所の解決と Windows パス変換の処理について、ライブラリ全体で合意されたアプローチが確立されていることを完了条件とします。

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

評価

技術スタック
cpp
領域
operating-systems
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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