Skip to content

repl: display error message when loading directory - #4170

Closed
princejwesley wants to merge 1 commit into
nodejs:masterfrom
princejwesley:repl-load-dir
Closed

repl: display error message when loading directory#4170
princejwesley wants to merge 1 commit into
nodejs:masterfrom
princejwesley:repl-load-dir

Conversation

@princejwesley

Copy link
Copy Markdown
Contributor

When loading directory instead of file, no error message
is displayed. Its good to display error message for
this scenario.

Before:

 > .load /Users/princejohnwesley/Projects/Playground/Node
>

After:

 > .load /Users/princejohnwesley/Projects/Playground/Node
Failed to load:/Users/princejohnwesley/Projects/Playground/Node is not a file
>

@JungMinuJungMinu added the repl Issues and PRs related to the REPL subsystem. label Dec 6, 2015
Comment threadlib/repl.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe is not a file -> is not a valid file

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@princejwesley
princejwesleyforce-pushed the repl-load-dir branch 2 times, most recently from 88ebc6d to 3e03a6aCompareDecember 6, 2015 10:51
@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@JungMinu Updated.

@JungMinu

Copy link
Copy Markdown
Member

/cc @evanlucas@thefourtheye PTAL :)

@jasnelljasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Dec 9, 2015
@jasnell

Copy link
Copy Markdown
Member

Semver-major due to the added throw

@jasnell

Copy link
Copy Markdown
Member

LGTM

@JungMinuJungMinu self-assigned this Dec 9, 2015
@JungMinu

Copy link
Copy Markdown
Member

LGTM

@bnoordhuis

Copy link
Copy Markdown
Member

Can you add a regression test to test/parallel/test-repl-.save.load.js?

@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis Sure. I'll add and update here

When loading directory instead of file, no error message
is displayed. Its good to display error message for
this scenario.
Before:
> .load /Users/princejohnwesley/Projects/Playground/Node
>
After:
> .load /Users/princejohnwesley/Projects/Playground/Node
Failed to load:/Users/princejohnwesley/Projects/Playground/Node is not a valid file
>
@princejwesley

Copy link
Copy Markdown
ContributorAuthor

@bnoordhuis Test added

@bnoordhuis

Copy link
Copy Markdown
Member

@bnoordhuis

Copy link
Copy Markdown
Member

@JungMinu I see you've assigned this to yourself. Feel free to land it when the CI checks out.

@JungMinu

Copy link
Copy Markdown
Member

CI is happy except for unrelated Windows test :)

JungMinu pushed a commit that referenced this pull request Dec 11, 2015
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.
PR-URL: #4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
@JungMinu

Copy link
Copy Markdown
Member

Thanks, landed in aad6b9f

@Fishrock123

Copy link
Copy Markdown
Contributor

@jasnell how is this semver-major?

@jasnell

Copy link
Copy Markdown
Member

@Fishrock123 ... precautionary based on the new throw. If folks are
comfortable with it as semver-minor then I'm good too.
On Dec 11, 2015 8:20 AM, "Jeremiah Senkpiel" notifications@github.com
wrote:

@jasnellhttps://github.com/jasnell how is this semver-major?


Reply to this email directly or view it on GitHub
#4170 (comment).

@ChALkeR

Copy link
Copy Markdown
Member

@jasnell Is there a new throw?

@jasnell

Copy link
Copy Markdown
Member

Sorry, not new throw... sigh, I'm doing too many things at once. I meant the new output message. While it's not technically a throw, it is a new output indicating that the operation failed. The ctc had decided to treat changes to error messages as semver-major... this one comes across as a grey area to me so to be safe I flagged it. Like I said tho, I'm perfectly fine with removing that if others are -- I may just be being overly conservative on it :-)

@ChALkeR

Copy link
Copy Markdown
Member

The ctc had decided to treat changes to error messages as semver-major...

Ah, that makes sense then, thanks for the explanation! =)

@Fishrock123

Copy link
Copy Markdown
Contributor

I don't think REPL warnings count as error messages.

(We've added and changed lots of them with the repl history stuff anyways.)

@jasnell

Copy link
Copy Markdown
Member

@Fishrock123 ... ok! works for me then. Removing the flag :-)

@jasnelljasnell removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Dec 11, 2015
cjihrig pushed a commit that referenced this pull request Dec 15, 2015
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.
PR-URL: #4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
@rvaggrvagg mentioned this pull request Dec 17, 2015
MylesBorins pushed a commit that referenced this pull request Dec 29, 2015
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.
PR-URL: #4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.
PR-URL: #4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Jan 19, 2016
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
Notable changes:
* assert
- accommodate ES6 classes that extend Error (Rich Trott) #4166
* build
- add "--partly-static" build options (Super Zheng) #4152
* deps
- backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655
- backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128
- upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé)
* docs
- various updates landed in 70 different commits!
* repl
- attach location info to syntax errors (cjihrig) #4013
- display error message when loading directory (Prince J Wesley) #4170
* tests
- various updates landed in over 50 commits
* util
- allow lookup of hidden values (cjihrig) #3988
MylesBorins pushed a commit that referenced this pull request Jan 20, 2016
Notable changes:
* assert
- accommodate ES6 classes that extend Error (Rich Trott) #4166
* build
- add "--partly-static" build options (Super Zheng) #4152
* deps
- backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655
- backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128
- upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé)
* docs
- various updates landed in 70 different commits!
* repl
- attach location info to syntax errors (cjihrig) #4013
- display error message when loading directory (Prince J Wesley) #4170
* tests
- various updates landed in over 50 commits
* util
- allow lookup of hidden values (cjihrig) #3988
PR-URL: #4768
MylesBorins pushed a commit that referenced this pull request Jan 20, 2016
Notable changes:
* assert
- accommodate ES6 classes that extend Error (Rich Trott) #4166
* build
- add "--partly-static" build options (Super Zheng) #4152
* deps
- backport 066747e from upstream V8 (Ali Ijaz Sheikh) #4655
- backport 200315c from V8 upstream (Vladimir Kurchatkin) #4128
- upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé)
* docs
- various updates landed in 70 different commits!
* repl
- attach location info to syntax errors (cjihrig) #4013
- display error message when loading directory (Prince J Wesley) #4170
* tests
- various updates landed in over 50 commits
* util
- allow lookup of hidden values (cjihrig) #3988
PR-URL: #4768
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.
PR-URL: nodejs#4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Notable changes:
* assert
- accommodate ES6 classes that extend Error (Rich Trott) nodejs#4166
* build
- add "--partly-static" build options (Super Zheng) nodejs#4152
* deps
- backport 066747e from upstream V8 (Ali Ijaz Sheikh) nodejs#4655
- backport 200315c from V8 upstream (Vladimir Kurchatkin) nodejs#4128
- upgrade libuv to 1.8.0 (Saúl Ibarra Corretgé)
* docs
- various updates landed in 70 different commits!
* repl
- attach location info to syntax errors (cjihrig) nodejs#4013
- display error message when loading directory (Prince J Wesley) nodejs#4170
* tests
- various updates landed in over 50 commits
* util
- allow lookup of hidden values (cjihrig) nodejs#3988
PR-URL: nodejs#4768
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

replIssues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@princejwesley@JungMinu@jasnell@bnoordhuis@Fishrock123@ChALkeR@MylesBorins