Skip to content

Snapshot output seems noisy; are we emitting needlessly redundant references? #152

Closed
@varungandhi-src

Description

@varungandhi-src

If you run scip snapshot on the index generated from running scip-typescript on itself, the output you get for FileIndexer.ts starts with:

  import * as ts from 'typescript'
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/
//            ^^ reference scip-typescript npm typescript 4.6.2 lib/typescript.d.ts/ts/

Are we emitting one reference per use of ts in the file? 😅 This should probably get compressed away, but it'd be nice to avoid doing the work in the first place.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions