Skip to content
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

v8::String::Value is deprecated #54417

Closed
targos opened this issue Aug 17, 2024 · 1 comment · Fixed by #55458
Closed

v8::String::Value is deprecated #54417

targos opened this issue Aug 17, 2024 · 1 comment · Fixed by #55458
Labels
deprecations Issues and PRs related to deprecations. v8 engine Issues and PRs related to the V8 dependency.

Comments

@targos
Copy link
Member

targos commented Aug 17, 2024

We should use v8::String::ValueView instead.

Refs:

class V8_EXPORT Value {
public:
V8_DEPRECATE_SOON(
"Prefer using String::ValueView if you can, or string->Write to a "
"buffer if you cannot.")

/cc @anonrig

@targos
Copy link
Member Author

targos commented Aug 17, 2024

Here are the places where we use it:


[51/238] CXX obj/src/libnode.node_buffer.o
../../src/node_buffer.cc:969:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value needle_value(isolate, needle);
                  ^

../../src/node_buffer.cc:1299:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value value(env->isolate(), input);
                  ^

../../src/node_buffer.cc:1359:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value value(env->isolate(), input);
                  ^

[11/113] CXX obj/src/libnode.inspector_js_api.o
../../src/inspector_js_api.cc:249:17: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
  String::Value task_name_value(args.GetIsolate(), task_name);
                ^

[143/272] CXX obj/src/libnode.string_bytes.o
../../src/string_bytes.cc:325:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:381:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:403:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:497:21: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
      String::Value value(isolate, str);
                    ^

../../src/string_bytes.cc:503:21: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
      String::Value value(isolate, str);
                    ^

[159/272] CXX obj/src/libnode.inspector_js_api.o
../../src/inspector_js_api.cc:249:17: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
  String::Value task_name_value(args.GetIsolate(), task_name);
                ^

@RedYetiDev RedYetiDev added v8 engine Issues and PRs related to the V8 dependency. deprecations Issues and PRs related to deprecations. labels Aug 17, 2024
RedYetiDev added a commit to RedYetiDev/node that referenced this issue Oct 19, 2024
RedYetiDev added a commit to RedYetiDev/node that referenced this issue Oct 19, 2024
Ceres6 pushed a commit to Ceres6/node that referenced this issue Oct 30, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this issue Nov 1, 2024
Fixes #54417
Ref: #55452

PR-URL: #55458
Refs: #55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
tpoisseau pushed a commit to tpoisseau/node that referenced this issue Nov 21, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Issues and PRs related to deprecations. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
2 participants