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

[Backport into 5.17] Removing unique and the unused NAN_SET_BUF_DETACH #8562

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Nov 28, 2024

Explain the changes

  1. unique was removed from shared_ptr
    This PR removes unique and the unused NAN_SET_BUF_DETACH

Signed-off-by: liranmauda [email protected]
(cherry picked from commit 0215f39)

More details in the original PR: #8513

Issues:

  1. After updating Mac OS M1 we started to face the error (on npm run rebuild):

In file included from ../src/native/fs/fs_napi.cpp:3:
../src/native/fs/../util/buf.h:173:23: error: no member named 'unique' in 'std::shared_ptrnoobaa::Buf::Alloc'
173 | return _alloc.unique();
| ~~~~~~ ^
1 error generated.
make: *** [Release/obj.target/nb_native/src/native/fs/fs_napi.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess. (/Users/shiradymnik/SourceCode/noobaa-core/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Darwin 24.0.0
gyp ERR! command "/Users/shiradymnik/.nvm/versions/node/v20.11.0/bin/node" "/Users/shiradymnik/SourceCode/noobaa-core/node_modules/.bin/node-gyp" "build"
gyp ERR! cwd /Users/shiradymnik/SourceCode/noobaa-core
gyp ERR! node -v v20.11.0
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok

Testing Instructions:

  1. I run: npm run rebuild.

Note: original instruction -

see that we can compile using c++20

  • Doc added/updated
  • Tests added

`unique` was removed from `shared_ptr`
This PR removes `unique` and the unused `NAN_SET_BUF_DETACH`

Signed-off-by: liranmauda <[email protected]>
(cherry picked from commit 0215f39)
@liranmauda liranmauda merged commit ee50557 into noobaa:5.17 Nov 28, 2024
10 checks passed
@shirady shirady deleted the backport-into-5_17 branch November 28, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants