| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
cc @nodejs/tsc @nodejs/fs appreciate your input on which path to take. previous pr:
this pr:
|
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
Windows compilation is failing: C:\workspace\node-compile-windows-debug\node\deps\v8\src\base\bits.h(477,31): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\workspace\node-compile-windows-debug\node\tools\v8_gypfiles\mksnapshot.vcxproj]
embedded-file-writer.cc
mksnapshot.cc
embedded-empty.cc
platform-embedded-file-writer-base.cc
platform-embedded-file-writer-generic.cc
platform-embedded-file-writer-win.cc
platform-embedded-file-writer-aix.cc
platform-embedded-file-writer-mac.cc
snapshot-empty.cc
static-roots-gen.cc
Creating library ..\..\out\Debug\mksnapshot.lib and object ..\..\out\Debug\mksnapshot.exp
mksnapshot.vcxproj -> ..\..\out\Debug\\mksnapshot.exe
generating: "..\..\out\Debug\obj\v8_snapshot\/snapshot.cc" "..\..\out\Debug\obj\v8_snapshot\/embedded.S"
Assembling ..\..\out\Debug\obj\v8_snapshot\\embedded.S...
setup-isolate-deserialize.cc
C:\workspace\node-compile-windows-debug\node\deps\v8\src\base\bits.h(477,31): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\workspace\node-compile-windows-debug\node\tools\v8_gypfiles\v8_snapshot.vcxproj]
snapshot.cc
C:\workspace\node-compile-windows-debug\node\deps\v8\src\base\bits.h(477,31): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\workspace\node-compile-windows-debug\node\tools\v8_gypfiles\v8_snapshot.vcxproj]
v8_snapshot.vcxproj -> ..\..\out\Debug\lib\v8_snapshot.lib
|
Sorry, something went wrong.
|
@nodejs/platform-windows any idea why this build is failing? |
Sorry, something went wrong.
|
Building locally, I got this: C:\Users\vinic\Desktop\Projects\node\src\node_file.cc(3036,15): error C2664: 'void node::Environment::ThrowUVException(int,const char *,const char *,const char *,const char *)': cannot convert argument 4 from 'const std::filesystem::path::value_type *' to 'const char *' [C:\Users\vinic\Desktop\Projects\node\libnode.vcxproj] |
Sorry, something went wrong.
This is also in the log from the CI. Based on the error message, this looks very similar to what we had in #53600 because std::filesystem::path::value_type is different on POSIX and Windows. |
Sorry, something went wrong.
It seems I forgot a src_path.c_str() there. Thank you! @StefanStojanovic @H4ad |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Still LGTM
Sorry, something went wrong.
PR-URL: #53614 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #53614 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| ? std::filesystem::symlink_status(src_path, error_code) | ||
| : std::filesystem::status(src_path, error_code); | ||
| if (error_code) { | ||
| return env->ThrowUVException(EEXIST, "lstat", nullptr, src.out()); |
There was a problem hiding this comment.
This looks wrong, the error code should be properly translated instead of being directly mapped to EEXIST, there are many other reasons why this could fail.
Sorry, something went wrong.
| ToNamespacedPath(env, &src); | ||
| THROW_IF_INSUFFICIENT_PERMISSIONS( | ||
| env, permission::PermissionScope::kFileSystemRead, src.ToStringView()); | ||
| auto src_path = std::filesystem::path(src.ToStringView()); |
There was a problem hiding this comment.
BufferValue converts the string to UTF8, on Windows this requires automatic conversion for char8_t to work which may not be supported by the version of MSVC we use, I think that may be the source of bugs like #54476
Sorry, something went wrong.
There was a problem hiding this comment.
Actually no, this is simply broken on Windows, because this just gets returned in char. It needs to be returned as std::u8string/std::u8string_view instead.
Sorry, something went wrong.
…ths on Windows
fs.cpSync({ recursive: true }) on Node 22 for Windows aborts the whole
process (STATUS_STACK_BUFFER_OVERRUN / 0xC0000409, no JS exception) when
the source path contains non-ASCII characters such as a CJK home
directory (nodejs/node#54476, regression from nodejs/node#53614). The
plugin declares engines "^22.19.0 || >=24.0.0", so Node 22 must work.
Replace the two cpSync call sites with a per-entry recursive copy
(mkdirSync + copyFileSync + utimesSync to preserve mtimes) and add a
regression test using a CJK preset directory name.
| Back | FazBrowse Home | New Git URL |
#53612 is required to do a benchmark
A different approach to #53541
cc @nodejs/performance @nodejs/cpp-reviewers @billywhizz @jasnell @nodejs/fs
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1573/
Small win on happy path, and probably high win on error path: