Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fs: validate args of truncate functions in js" #7950

Closed

Conversation

MylesBorins
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

fs

Description of change

This reverts commit c86c1ee.

original commit message:

This patch

 1. moves the basic validation of arguments to `truncate` family
    of functions to the JavaScript layer from the C++ layer.

 2. makes sure that the File Descriptors are validated strictly.

PR-URL: #2498
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

This commit needs to be reverted in order to revert 9359de9

Please see more about the discussion in #7846

@MylesBorins MylesBorins added the fs Issues and PRs related to the fs subsystem / file system. label Aug 2, 2016
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Aug 2, 2016
@MylesBorins
Copy link
Contributor Author

@MylesBorins MylesBorins mentioned this pull request Aug 2, 2016
2 tasks
@misterdjules
Copy link

LGTM.

@rvagg
Copy link
Member

rvagg commented Aug 2, 2016

lgtm :shipit:

@JungMinu
Copy link
Member

JungMinu commented Aug 3, 2016

LGTM

1 similar comment
@jasnell
Copy link
Member

jasnell commented Aug 3, 2016

LGTM

This reverts commit c86c1ee.

original commit message:

    This patch

     1. moves the basic validation of arguments to `truncate` family
        of functions to the JavaScript layer from the C++ layer.

     2. makes sure that the File Descriptors are validated strictly.

    PR-URL: nodejs#2498
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>

PR-URL: nodejs#7950
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor Author

landed in c5a18e7

@MylesBorins MylesBorins closed this Aug 4, 2016
@ChALkeR
Copy link
Member

ChALkeR commented Aug 4, 2016

Ah, so we ended up reverting the tests? Could those be re-applied later, perhaps?

Refs: #7846 (comment)
Refs: #7899 (comment)

@jasnell
Copy link
Member

jasnell commented Aug 4, 2016

Likely best to just open a new PR adding those back in. As a reminder for myself: were those going to be kept as known-issue tests or regular tests?

@ChALkeR
Copy link
Member

ChALkeR commented Aug 4, 2016

@jasnell My understanding was that (sub)tests that are still passing should be kept as regular tests.

E.g. assert.throws(function() { fs.truncateSync([]); }, /path must be a string/); passes even on v6.3.1.

@MylesBorins
Copy link
Contributor Author

@ChALkeR would you be willing to submit another PR with the appropriate tests included built on top of this PR? I'm on vacation and don't have a ton of time to invest ATM, but would like to see this land

@cjihrig cjihrig mentioned this pull request Aug 8, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Aug 10, 2016

@thealphanerd this doesn't apply cleanly to v6.x. Could you please backport it.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 10, 2016

Actually, this reverts PR #2498, which was also labeled as semver major. That shouldn't have gone out in any releases. Did it? It doesn't look like it did. If it didn't, this should have the don't land on v6.x label.

@jasnell any info here?

@jasnell
Copy link
Member

jasnell commented Aug 10, 2016

It shouldn't have. I believe this revert was necessary to do the other reverts. If we get any more of these issues with fs I'm going to curl up in the corner and cry for a bit.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 10, 2016

I don't believe this needs to be backported to v6, so I'm going to add the label. Somebody (anybody) correct me if that is incorrect.

@MylesBorins
Copy link
Contributor Author

@cjihrig this should not have to land on v6.x for the above mentioned reasons. I'll make sure to get the label on there next time

@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@MylesBorins MylesBorins deleted the revert-fs-changes-part-one branch November 14, 2017 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants