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

url: stop exporting originFor() #10955

Closed
wants to merge 1 commit into from

Conversation

TimothyGu
Copy link
Member

In #10800, the utility of url.originFor() was discussed, and it was tentatively established that the function is not as useful as it might appear at first.

I'm still open to more discussions either on that issue or here, and this PR is just created to get things moving and to show how a removal can look like.

Fixes: #10800

/cc @nodejs/url

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

url

@TimothyGu TimothyGu added the addons Issues and PRs related to native addons. label Jan 22, 2017
@nodejs-github-bot nodejs-github-bot added dont-land-on-v4.x url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Jan 22, 2017
@jasnell
Copy link
Member

jasnell commented Jan 22, 2017

I'm -1 on the full range of changes here. For now we can simply not export originFor in lib/url.js.

@TimothyGu TimothyGu removed addons Issues and PRs related to native addons. dont-land-on-v7.x url Issues and PRs related to the legacy built-in url module. labels Jan 22, 2017
@TimothyGu
Copy link
Member Author

@jasnell, changed.

@TimothyGu
Copy link
Member Author

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

If origin.inspect is no longer tested then maybe origin.inspect can be removed?

@TimothyGu
Copy link
Member Author

@joyeecheung, that was what I had at first (along with a change that removed unnecessary symbols), but @jasnell objected to it.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

Not sure if we should leave untested code floating around, but LGTM anyway.

@jasnell
Copy link
Member

jasnell commented Jan 23, 2017

I'd like it to remain for now because I may have use for it. I need to finish up a few other things before I'll get back to that, however, so I'd like for it to stay in the meantime

@TimothyGu
Copy link
Member Author

I'll land this tomorrow if there are no objections.

@joyeecheung
Copy link
Member

joyeecheung commented Jan 27, 2017

@TimothyGu I think probably you need to consult @jasnell first whether he doesn't need this anymore? (from #10955 (comment))

@TimothyGu
Copy link
Member Author

@joyeecheung, I believe he was not referring to the originFor() function (after all, he did approve of this PR), but rather your comment about unused code.

@joyeecheung
Copy link
Member

@TimothyGu Oh right, I was confused about the "it"..in that case this is ready to land! Sorry about the confusion.

@TimothyGu
Copy link
Member Author

@TimothyGu
Copy link
Member Author

Landed in e71c278.

@TimothyGu TimothyGu closed this Jan 27, 2017
@TimothyGu TimothyGu deleted the remove-url-originFor branch January 27, 2017 15:37
TimothyGu added a commit that referenced this pull request Jan 27, 2017
PR-URL: #10955
Fixes: #10800
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
TimothyGu added a commit to TimothyGu/node that referenced this pull request Jan 31, 2017
PR-URL: nodejs#10955
Fixes: nodejs#10800
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
evanlucas pushed a commit that referenced this pull request Jan 31, 2017
PR-URL: #10955
Fixes: #10800
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

url: re-investigate the usefulness of url.originFor()
5 participants