Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 28, 2026

  • Document that logReadFiles requires FS_DEBUG to be set.
  • Put both parts of this features (both the logging to stderr and the tracking in FS.openedFiles) behing FS_DEBUG instead of only the former.

The actual string that was logged was changed in #7418, but I think it was in error.

@sbc100 sbc100 requested a review from kripken January 28, 2026 17:34
FS.chmod(node, mode & 0o777);
}
#if expectToReceiveOnModule('logReadFiles')
#if FS_DEBUG
Copy link
Member

Choose a reason for hiding this comment

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

Is this PR changing the requirement of FS_DEBUG, or just documenting it? From the description I thought the latter, but the code seems to actually add it..?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The log message was already wrapped in FS_DEBUG yes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think maybe there was some confusion about how this feature worked. See #7418, where the log message was changed.

The log message is the feature really. Since it was already wrapped in FS_DEBUG I think its best to document that. I seems reasonable to run in FS_DEBUG mode if want to get a list of opened files.

Copy link
Member

Choose a reason for hiding this comment

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

Aside from the log there is old line 1166 though, FS.readFiles[path] = 1? I think users might have just used that, without the logging?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Perhaps? Seems like we should probably keeps this as just one feature though. Bifurcating it further seems like complexity we don't need. Putting the whole feature behind FS_DEBUG seems like the most sensible thing to do.

Also, document that `logReadFiles` requires `FS_DEBUG` to be set.
Copy link
Collaborator Author

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

I updated the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants