Path Contexts
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- operating-systems
Direzione di ricerca
Non sono indicati file o test. Inizia individuando i *Path types e LocalPath esistenti, quindi traccia i relativi costruttori e le operazioni di manipolazione dei percorsi. Il lavoro è completo quando questi tipi condividono un’API di contesto del percorso che supporti separatori, comportamento specifico della piattaforma, validazione, contesti del costruttore personalizzati e il comportamento predefinito di LocalPathContext.Instance descritto nel TODO.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We'll need a file system API for virtual paths. Local path (#1) should implement the same API, so it should be possible to abstract over both kinds of paths.
The API should allow to:
- manipulate foreign paths, e.g. Windows paths on a Linux computer, and vice versa;
- introduce fully virtual file systems.
Currently, I am thinking of adding a new field of type IFileSystem or IPathContext to each of our path types: hopefully, this won't create too much overhead for their storage.
Default constructors would rely on a singleton instance for the current system, something like new LocalPath("foo") => new LocalPath("foo", LocalFileSystem.Instance).
There should be a way for the user to introduce custom path validation in constructor. For example, if they want to somehow avoid Windows paths on Linux and want to throw on new LocalPath(CustomContext, @"C:\Windows"), even though this path is valid.
TODO
- Introduce a field into all
*Pathtypes. - Derive the path manipulation operations to the path context:
- path separators,
- behavior aspects such as Windows drives,
- path validation in constructors (even for
LocalPaththat doesn't do any validation otherwise).
- Allow passing the context to path constructors.
- The constructors should delegate to some
LocalPathContext.Instanceby default (if nothing else is passed). -
LocalPathContext.Instanceshould be a writable field (for global custom override). - Future enhancement request: allow
ThreadLocaland/orAsyncLocaloverride forLocalPathContext, to avoid reliance on the global state.
- Lingua principale
- C#
- Stelle
- 104
- Fork
- 19
- Merge medio
- 13h 42m
- PR unite (30g)
- 9
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ForNeVeR/TruePath
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
-
Dependency Dashboard Apertadashboard
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
Tutte le issue di ForNeVeR/TruePath
Issue simili
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/vscode-azurefunctions#5197 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
microsoft/microsoft-ui-reactor#1274 ·