Skip to content

Refactor fs (cache/tracing) layer into self-contained API #1161

Open

Description

@cspotcode

We have multiple codepaths which both duplicate FS access code. Additionally, our source-map-support hook touches this FS caching layer.

Refactor into a single fs API which can be instantiated by a factory like createFsLayer() or createFsHost() and then used in all codepaths.

Having this layer may make future features, such as caching, easier to understand. For example, the fs layer can perform all writes into a cache, and all reads from either the cache or real filesystem, whichever is hit first.

Activity

  1. changed the title [-]Refactor fs (cache/tracing) layer[/-] [+]Refactor fs (cache/tracing) layer into self-contained API[/+] on Nov 22, 2020
  2. frank-dspeed commented on Jan 19, 2021

    @frank-dspeed

    Wouldn't it be better to implement something like resolve? i mean pre resolved stuff and do not modify the cache? I think the best place to solve all that issues is the resolve part inside TS we need a way to supply configuration for that and there are hooks implmented in TS for custom reslovers i am not aware if they are exposed or not

    But i think its worth investigation into that direction maybe that algins some how with import map support.

  3. cspotcode commented on Jan 19, 2021

    @cspotcode
    CollaboratorAuthor

    I think we're talking about different things. For FS caching, necessary to take advantage of --incremental, we need a way to persist what the compiler attempts to write to the filesystem without interfering with normal tsc invocations.

  4. added this to the next milestone on May 15, 2021
  5. modified the milestones: 10.2.0, next, 10.3.0 on Aug 8, 2021
  6. removed this from the 10.3.0 milestone on Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions