anthraxx / intellij-awesome-console

IntelliJ IDEA plugin: awesome console finally makes links in your console at least 200% more awesome!
MIT License
159 stars 40 forks source link

Do not work on windows #70

Open beauvaisbruno opened 3 years ago

beauvaisbruno commented 3 years ago

When I click on absolute path on a stack trace (C:\Users\bruno\WebstormProjects\shapito\server\functions\dist\commons\util.js:9:13) Capture

RichardBradley commented 3 years ago

Same here. My console output (from eslint) looks like this:

src\campaigns\Create.tsx
  Line 2:27:  'useCallback' is defined but never used  @typescript-eslint/no-unused-vars

I was hoping to be able to click on the filename, but I get:

[Window Title]
file:///C:\campaigns\Create.tsx

[Content]
Windows cannot find 'file:///C:\campaigns\Create.tsx'. Make sure you typed the name correctly, and then try again.

[OK]
Delagen commented 1 year ago

As for temporary solution I modified formatter to output linux style paths (via /), and it works

RichardBradley commented 1 year ago

Intriguing. When you say you modified "formatter", where & what is that? Are you saying that you forked the intellij-awesome-console IntelliJ plugin, recompiled it and installed your fork? Do you have a guide on how to do that & is your fork public? Or something else?

Delagen commented 1 year ago

@RichardBradley for example https://github.com/eslint-community/eslint-formatter-codeframe/blob/main/index.js#L33

replaced with

let relPath = path.relative(process.cwd(), filePath)
        .replaceAll(path.sep, path.posix.sep);
anthraxx commented 1 year ago

Status update: I'm working on a complete rewrite of the parsing logic with eager path matching iterating through a tree of words. If that works out we will finally have both: Proper windows detection as well as near arbitrary amount of allowed whitespaces in directory names.