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

TODO/XXX in tools directory #4635

Closed
Trott opened this issue Jan 12, 2016 · 6 comments
Closed

TODO/XXX in tools directory #4635

Trott opened this issue Jan 12, 2016 · 6 comments
Labels
tools Issues and PRs related to the tools directory.

Comments

@Trott
Copy link
Member

Trott commented Jan 12, 2016

Ref: #264

There are two TODO comments and one XXX comment in the tools directory that were placed there by project authors (as opposed to pre-existing in tools imported from outside the project). It would be great to either remove them from the code (if they are no longer valid or at least not particularly high value), or get issues opened for them, or just get whatever it is they are addressing addressed. Here they are as of this writing.

1: cpplint.py:

fullname = self.FullName()
# XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory.
toplevel = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
prefix = os.path.commonprefix([fullname, toplevel])
return fullname[len(prefix) + 1:]

There are other comments TODO etc. comments in cpplint.py but they were already there when the external project was first imported into the Node.js project.

2 and 3: osx-pkg-postinstall.sh

#!/bin/sh
# TODO Can this be done inside the .pmdoc?
# TODO Can we extract $PREFIX from the installer?
cd /usr/local/bin
ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm

cc @bnoordhuis

@Trott Trott added tools Issues and PRs related to the tools directory. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. good first issue Issues that are suitable for first-time contributors. labels Jan 12, 2016
@Fishrock123
Copy link
Contributor

2 and 3: osx-pkg-postinstall.sh

postinstall doesn't even actually run in the OS X installer (no one knows how pkgmaker actually works)

@trendsetter37
Copy link
Contributor

I can probably start on this. At least with the first one to begin with...

@trendsetter37
Copy link
Contributor

@Trott @Fishrock123 Regarding number one, I saw that the expected prefix is not removed if a user is on a Windows machine. This happens because the self.Fullname() converts backslashes to forward slashes.

def FullName(self):
    """Make Windows paths like Unix."""
    return os.path.abspath(self._filename).replace('\\', '/')

Conversely, the toplevel operation does not do this so the resulting prefix will only contain C: as opposed to C:/Code/node/.

The difference in return values will be Code/node/tools/cpplint.py & tools/cpplint.py. I think the latter is the desired behavior. Is this going in the right direction @Fishrock123? If so I can go ahead and send a PR with a small fix that consists of converting the backslashes in the toplevel var along with removing the comment.

Note that the Code directory is just where my node repo lives.

@Fishrock123
Copy link
Contributor

@trendsetter37 That seems about right. As a note, IIRC we don't actually run cpplint on Windows, so it could be a step to resolving that.

trendsetter37 added a commit to trendsetter37/node that referenced this issue Jan 7, 2017
@jasnell
Copy link
Member

jasnell commented May 30, 2017

@Trott ... any reason to keep this open?

@Trott
Copy link
Member Author

Trott commented May 30, 2017

(copy/pasted from a related issue)

@jasnell I'm OK with closing this and the other TODO/XXX/FIXME issues. If any of those items are things that really ought to be fixed (rather than a wishlist or a "will fix after Magical Feature X is available"), a separate issue should be opened anyway because it's just getting lost in these out-of-date tracking issues.

While I think this issue is superfluous personally, anyone else should feel free to re-open (if GitHub permits them to) or comment requesting this be re-opened.

@Trott Trott closed this as completed May 30, 2017
@Trott Trott removed good first issue Issues that are suitable for first-time contributors. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. mentor-available labels May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

No branches or pull requests

4 participants