GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: clarify symlink resolution for __filename by Trott · Pull Request #24587 · nodejs/node

Conversation

@Trott

@Trott Trott commented Nov 24, 2018

Copy link
Copy Markdown
Member

Make it more explicit that symlinks are resolved in __filename.

Refs: #22602 (comment)

/ping @sam-github @Pomax

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott
doc: clarify symlink resolution for __filename
7bd2267
Make it more explicit that symlinks are resolved in `__filename`.

Refs: nodejs#22602 (comment)
@nodejs-github-bot

nodejs-github-bot commented Nov 24, 2018

Copy link
Copy Markdown
Collaborator

@Trott build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/1687/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. module Issues and PRs related to the module subsystem. labels Nov 24, 2018
addaleax
addaleax approved these changes Nov 24, 2018
View reviewed changes
Comment thread doc/api/modules.md Outdated

The file name of the current module. This is the resolved absolute path of the
current module file.
The file name of the current module. This is current module file's absolute path

@addaleax addaleax Nov 24, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Just an idea, but I think file could be omitted or moved before path, which might be even clearer?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Trott Trott Nov 24, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

So either current module's absolute path or else current module's absolute file path? It's subtle, but I wonder if that might make someone expect __dirname value instead of __filename if a module is loaded or invoked at the directory level (e.g., node . instead of node index.js).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott

Trott commented Nov 24, 2018

Copy link
Copy Markdown
Member Author

One thing this does not mention explicitly is that . and .. are also resolved. To me, that seems obvious/implied by "file's absolute path" but I'm flagging this here in case others disagree. (The wording being replaced here makes that very easy to miss too, and it hasn't seemed to cause any problems.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt approved these changes Nov 24, 2018
View reviewed changes
cjihrig
cjihrig approved these changes Nov 24, 2018
View reviewed changes
Comment thread doc/api/modules.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Trott
fixup! doc: clarify symlink resolution for __filename
1303da6
@Trott

Trott commented Nov 24, 2018

Copy link
Copy Markdown
Member Author

Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/1695/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott added a commit to Trott/io.js that referenced this pull request Nov 27, 2018
@Trott
doc: clarify symlink resolution for __filename
bb04a8b
Make it more explicit that symlinks are resolved in `__filename`.

Refs: nodejs#22602 (comment)
PR-URL: nodejs#24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@Trott

Trott commented Nov 27, 2018

Copy link
Copy Markdown
Member Author

Landed in bb04a8b

Pomax reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott closed this Nov 27, 2018
targos pushed a commit that referenced this pull request Nov 27, 2018
@Trott @targos
doc: clarify symlink resolution for __filename
e1c8673
Make it more explicit that symlinks are resolved in `__filename`.

Refs: #22602 (comment)
PR-URL: #24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
@Trott @rvagg
doc: clarify symlink resolution for __filename
5a47c2e
Make it more explicit that symlinks are resolved in `__filename`.

Refs: #22602 (comment)
PR-URL: #24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
v11.4.0 proposal #24854
Merged
4 tasks done
This was referenced Dec 7, 2018
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#261
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#262
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#263
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#264
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#265
Closed
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
@Trott @refack
doc: clarify symlink resolution for __filename
a8b6294
Make it more explicit that symlinks are resolved in `__filename`.

Refs: nodejs#22602 (comment)
PR-URL: nodejs#24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
BethGriggs pushed a commit that referenced this pull request Feb 11, 2019
@Trott @BethGriggs
doc: clarify symlink resolution for __filename
546f941
Make it more explicit that symlinks are resolved in `__filename`.

Refs: #22602 (comment)
PR-URL: #24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@BethGriggs BethGriggs added the land-on-v10.x label Feb 11, 2019
@BethGriggs BethGriggs mentioned this pull request Feb 12, 2019
v10.15.3 proposal #26063
Merged
rvagg pushed a commit that referenced this pull request Feb 28, 2019
@Trott @rvagg
doc: clarify symlink resolution for __filename
64b1fa7
Make it more explicit that symlinks are resolved in `__filename`.

Refs: #22602 (comment)
PR-URL: #24587
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@Trott
Trott deleted the resolved branch January 13, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@addaleax addaleax addaleax approved these changes
@cjihrig cjihrig cjihrig approved these changes
+1 more reviewer
@vsemozhetbyt vsemozhetbyt vsemozhetbyt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

doc Issues and PRs related to Node.js documentation. module Issues and PRs related to the module subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Trott @nodejs-github-bot @addaleax @cjihrig @vsemozhetbyt @BethGriggs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.