Skip to content

url: remove unused URL::ToObject() method - #14106

Closed
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:remove-unused-url-method
Closed

url: remove unused URL::ToObject() method#14106
bnoordhuis wants to merge 1 commit into
nodejs:masterfrom
bnoordhuis:remove-unused-url-method

Conversation

@bnoordhuis

@bnoordhuisbnoordhuis commented Jul 6, 2017

Copy link
Copy Markdown
Member

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Jul 6, 2017
@bmeck

bmeck commented Jul 6, 2017

Copy link
Copy Markdown
Member

Used in ESM

@jasnell

Copy link
Copy Markdown
Member

-1... this was added to support ongoing future development work. It should not be removed.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

I've commented on that in #14096. Suffice to say I think it's plain stupid1 to land unused code. To add more insult, unused code with glaring bugs in it. The "but it's going to be used any day now" argument doesn't hold water, this code has been in master for months.

I'm keeping this PR around in case that ESM PR doesn't materialize in the next few days. Consider it a Sword of Damocles.

1 In case you take exception to that word, take comfort in the fact that I thought for quite some time about alternative wording and couldn't come up with anything that still does justice to the way I feel about this.

@bmeck

Copy link
Copy Markdown
Member

@bnoordhuis is that some sort threat to land this regardless of how others feel?

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

Not a threat, I'm just not closing it just yet. I'll put it before the CTC if this ESM PR doesn't happen quick enough unless @jasnell changes his mind in the mean time.

@gibfahn

Copy link
Copy Markdown
Member

Agreed that it shouldn't have landed without the code that uses it (unless there's a particular reason to). However now it's here removing it adds churn, so unless ESM is >6months away from master it doesn't seem worth removing.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

@bmeck Status update? 'Next day or two' is almost two weeks ago now.

@bmeck

bmeck commented Jul 17, 2017 via email

Copy link
Copy Markdown
Member

@bmeckbmeck closed this Jul 17, 2017
@bmeckbmeck reopened this Jul 17, 2017
@jasnell

Copy link
Copy Markdown
Member

I'm still -1 on removing this. There's no reason to do so, the small amount of code is harmless, adds zero burden on anyone, and is planned for use. Anyone who feels strongly enough can ask for a vote, of course.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

@bmeck Sorry to hear that, take care.

@jasnell I remember being baffled about the existence of that method before while reviewing another PR. Since 'zero burden' is not in fact the case and 'planned for use' may not be any time soon, will you reconsider?

@targos

Copy link
Copy Markdown
Member

I see no problem in removing it. This commit can just be reverted when the method is needed.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

@bmeck@jasnell Is URL::ToObject() going to be used in #14369 or do I need to put this to a vote at the next CTC meeting?

@bmeck

Copy link
Copy Markdown
Member

@jasnell

Copy link
Copy Markdown
Member

@bnoordhuis ... Yes.

@jasnelljasnell left a comment

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.

-1, API is being used.

@TimothyGu

Copy link
Copy Markdown
Member

This is getting silly. The function works, and there is an open PR using this function. It would be counterproductive to remove it now. Closing.

@bnoordhuis

Copy link
Copy Markdown
MemberAuthor

@TimothyGu Well, duh - that's why I asked the question. But read up on the history, it's been defective for most of its lifetime and rather glaringly so. I don't want this to happen again.

@bnoordhuis
bnoordhuis deleted the remove-unused-url-method branch August 1, 2017 13:31
Sign up for freeto 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++.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@bnoordhuis@bmeck@jasnell@gibfahn@targos@TimothyGu@nodejs-github-bot