Skip to content

Flow tool remove-comments throws with unused suppression in [libs] #8334

Open
@wbinnssmith

Description

@wbinnssmith

Flow version: 0.121.0
Flow tool version: 675c89d

Expected behavior

Flow tool remove-comments is able to either remove or ignore unused suppressions in definitions in [libs]

Actual behavior

Flow tool remove-comments throws:

uncaught rejection
[Error: ENOENT: no such file or directory, open '/path/to/project/[LIB] flow-libs/lib.js'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/path/to/project/[LIB] flow-libs/lib.js'
}
Error: ENOENT: no such file or directory, open '/path/to/project/[LIB] flow-libs/lib.js'

It looks like the file's name when processing errors includes the string [LIB] followed by a space.

To reproduce:

.flowconfig:

[libs]
flow-libs/

flow-libs/lib.js:

// @flow

declare module 'lib' {
	// $FlowFixMe
	declare export default number;
}

and run flow/tool remove-comments --bin path/to/flow .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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