This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253600 - recognize path in log output and generate link to a file:line:col
Summary: recognize path in log output and generate link to a file:line:col
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 06:34 UTC by elennaro
Modified: 2015-09-25 01:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example application (9.44 MB, application/octet-stream)
2015-09-23 14:56 UTC, elennaro
Details
screenshot (35.50 KB, image/png)
2015-09-23 15:00 UTC, elennaro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elennaro 2015-07-21 06:34:29 UTC
Say we have log output generated by some application:

Here's the require error(s):  Error: Cannot find module 'coffee-script/register'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Hook.defaults (D:\****\node_modules\sails\lib\hooks\moduleloader\index.js:44:9)
    at Hook.bound [as defaults] (D:\****\node_modules\sails\node_modules\lodash\dist\lodash.js:729:21)
    at applyDefaults (D:\****\node_modules\sails\lib\app\private\loadHooks.js:70:36)

It is in a well recognizable and parsable format:
Why don't generate a link to be able to move to a file:line:col?
Comment 1 Jaroslav Havlin 2015-09-22 12:21:19 UTC
Parsing of output data is handled by relevant project-support module.

If the output is generated by some action invoked in the IDE, it could be parsed (because the project knows what is format of stack-traces, for example). Otherwise, it would be difficult and expensive to parse a generic output.

Do you use some coffeescript plugin?
(The output parsing should be implemented there.)
Comment 2 elennaro 2015-09-22 18:58:14 UTC
No. It's pure node.js Sails application.
Comment 3 Jaroslav Havlin 2015-09-23 13:05:48 UTC
> No. It's pure node.js Sails application.
In that case, output parsing could be implemented in Node.js project support.
Reassigning to javascript/Node.js.
Thank you.
Comment 4 Petr Pisl 2015-09-23 13:29:52 UTC
Tome, probably you could look at this, if it belongs to the project support.
Comment 5 elennaro 2015-09-23 13:33:22 UTC
I can send an example app, if needed.
Comment 6 Petr Pisl 2015-09-23 14:09:13 UTC
If you can attach, it will be helpful. Thanks
Comment 7 elennaro 2015-09-23 14:56:55 UTC
Created attachment 156387 [details]
example application

Attached.

1) Unzip
2) Go to properties and choose to run it as Node Application
4) Run npm install on project
5) Run project
6) In the log you will see (screenshot attached).
Comment 8 elennaro 2015-09-23 15:00:20 UTC
Created attachment 156388 [details]
screenshot
Comment 9 Tomas Mysik 2015-09-24 05:55:10 UTC
This is a bug, thanks for catching it.
Comment 10 Tomas Mysik 2015-09-24 06:17:24 UTC
Fixed, please verify. Thanks.

http://hg.netbeans.org/web-main/rev/a642d58748b8
Comment 11 elennaro 2015-09-24 07:03:52 UTC
wow, thanks, that's great!
How can I verify? will it land in the nightly?
Comment 12 Tomas Mysik 2015-09-24 11:57:48 UTC
(In reply to elennaro from comment #11)
> wow, thanks, that's great!
> How can I verify? will it land in the nightly?

Yes, just a wait for a message which will appear here saying in which daily build the fix will be available.

Thanks.
Comment 13 Quality Engineering 2015-09-25 01:46:05 UTC
Integrated into 'main-silver', will be available in build *201509250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a642d58748b8
User: Tomas Mysik <tmysik@netbeans.org>
Log: #253600 - recognize path in log output and generate link to a file:line:col