You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v8 torque transpiler expects filenames relative to -v8-root. This seems to work on linux with makefile target - "<(V8_ROOT)/src/builtins/array.tq", will become ../src/builtins/array.tq - all good.
However, the msbuild generator tries to make this path absolute when its put through:
'inputs': [ # Order matters.
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
'<@(torque_files)',
],
I failed to get any solution working which would give me a working run_torque target.
I ended up patching that stupid behaviour out of torque by improving the error message, and making it attempt to simply directly opening the path instead of running it through its own vodoo:
void ReadAndParseTorqueFile(const std::string& path) {
SourceId source_id = SourceFileMap::AddSource(path);
CurrentSourceFile::Scope source_id_scope(source_id);
// path might be either a normal file path or an encoded URI.
auto fn = SourceFileMap::AbsolutePath(source_id);
auto maybe_content = ReadFile(fn);
std::string maybe_path;
if (!maybe_content) {
if (auto mmmaybe_path = FileUriDecode(path)) {
maybe_path = *mmmaybe_path;
maybe_content = ReadFile(maybe_path);
}
}
if (!maybe_content) {
maybe_content = ReadFile(path);
}
if (!maybe_content) {
std::string allPaths = path + " - " + fn + " - " + maybe_path;
Error("Cannot open file path/uri: ", allPaths).Throw();
}
ParseTorque(*maybe_content);
}
whats the best way ahead here? Find a fix for gyp3? Propose the torque fix upstream (if yes - is there somebody willing to do it? I hereby put my changes into public domain) ?
The text was updated successfully, but these errors were encountered:
--- a/generator/msvs.py
+++ b/generator/msvs.py
@@ -151,6 +151,9 @@ def _FixPath(path):
Returns:
The path with all slashes made into backslashes.
"""
+ if (path.endswith('.tq')):
+ return path
This is obviously a dirty hack - where could a more clever solution start?
The v8 torque transpiler expects filenames relative to
-v8-root
. This seems to work on linux with makefile target -"<(V8_ROOT)/src/builtins/array.tq",
will become../src/builtins/array.tq
- all good.However, the msbuild generator tries to make this path absolute when its put through:
I failed to get any solution working which would give me a working
run_torque
target.I ended up patching that stupid behaviour out of torque by improving the error message, and making it attempt to simply directly opening the path instead of running it through its own vodoo:
whats the best way ahead here? Find a fix for gyp3? Propose the torque fix upstream (if yes - is there somebody willing to do it? I hereby put my changes into public domain) ?
The text was updated successfully, but these errors were encountered: