-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: revert filesystem::path changes #55015
Conversation
Review requested:
|
eea22f7
to
37bd2dc
Compare
be2b0b8
to
b0e83d9
Compare
@joyeecheung Can you double check the changes on compile_cache.cc and header file? I manually had to change those lines, there was a conflict. |
auto file_status = std::filesystem::status(path); | ||
if (file_status.type() == std::filesystem::file_type::directory) { | ||
path /= "*"; | ||
uv_fs_t req; |
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.
@joyeecheung Is it safe to keep this function, or do we need this revert?
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.
Is std::filesystem::path(res)
correct? From what I can tell, res
contains UTF8-encoded data, and it's about to be passed into uv_fs_stat
which also expects UTF8-encoded data. So std::filesystem::path(res)
here is also going to crash on Windows when res
contains code points that are encoded differently in UTF16 unless it's casted between u8string both ways.
b0e83d9
to
67ddaa9
Compare
Is it possible to add a test for those issues? |
67ddaa9
to
ba26f0b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #55015 +/- ##
=======================================
Coverage 88.04% 88.04%
=======================================
Files 652 652
Lines 183764 183760 -4
Branches 35862 35863 +1
=======================================
Hits 161787 161787
+ Misses 15233 15230 -3
+ Partials 6744 6743 -1
|
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.
LGTM % nits
std::u8string cache_dir_with_tag_u8 = cache_dir_with_tag.u8string(); | ||
std::string cache_dir_with_tag_str(cache_dir_with_tag_u8.begin(), | ||
cache_dir_with_tag_u8.end()); | ||
std::string cache_dir_with_tag = |
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.
You can minimize the diff/potential conflicts if this is named as cache_dir_with_tag_str
Landed in 5a96671 |
PR-URL: #55015 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: nodejs#55015 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: nodejs#55015 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reverts #53063. There are still some
filesystem::path
references left, since they're added in multiple different PRs. Depending on whether we need them or not, we can remove them.We're reverting because it fixes multiple different regressions due to Windows UTF-16 path requirements.
Fixes #54991
Fixes #54476