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

fix: building node modules with Visual Studio 2017 #34109

Merged
merged 1 commit into from May 10, 2022

Conversation

miniak
Copy link
Contributor

@miniak miniak commented May 6, 2022

Description of Change

Build error occurs when [[deprecated]] is used in this context in Visual Studio 2017:

  template <class S>
  V8_DEPRECATE_SOON("See class comment.")
  TracedGlobal(Isolate* isolate, Local<S> that) : BasicTracedReference<T>() {
    this->val_ =
        this->New(isolate, that.val_, &this->val_,
                  internal::GlobalHandleDestructionMode::kWithDestructor,
                  internal::GlobalHandleStoreMode::kInitializingStore);
    static_assert(std::is_base_of<T, S>::value, "type check");
  }

https://developercommunity2.visualstudio.com/t/Adding-deprecated-to-a-templated-con/1232182
https://stackoverflow.com/questions/38499462/how-to-tell-clang-to-stop-pretending-to-be-other-compilers

Checklist

Release Notes

Notes: Fixed building node modules with Visual Studio 2017

@miniak miniak requested review from a team as code owners May 6, 2022 03:43
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 6, 2022
@miniak miniak added semver/patch backwards-compatible bug fixes target/18-x-y labels May 6, 2022
@trop
Copy link
Contributor

trop bot commented May 6, 2022

@miniak has manually backported this PR to "18-x-y", please check out #34110

Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you upstream this whole patch please?

@nornagon
Copy link
Member

nornagon commented May 6, 2022

also, building node modules with MSVC sounds like a recipe for disaster unless you're using N-API 😬

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 7, 2022
@miniak
Copy link
Contributor Author

miniak commented May 9, 2022

can you upstream this whole patch please?
@nornagon I can do that, but I don't think we should block this PR on that considering that we already have this patch and I am just fixing it.

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch fails to build

@miniak miniak force-pushed the miniak/deprecated-attribute branch from 202a8fc to b19ab0c Compare May 9, 2022 19:34
@miniak miniak requested a review from jkleinsc May 9, 2022 21:24
@miniak
Copy link
Contributor Author

miniak commented May 9, 2022

@jkleinsc fixed

@nornagon nornagon merged commit e76cf3e into main May 10, 2022
@nornagon nornagon deleted the miniak/deprecated-attribute branch May 10, 2022 21:26
@release-clerk
Copy link

release-clerk bot commented May 10, 2022

Release Notes Persisted

Fixed building node modules with Visual Studio 2017

@trop
Copy link
Contributor

trop bot commented May 10, 2022

I have automatically backported this PR to "19-x-y", please check out #34164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants