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

src: fix http2 debug build errors #16432

Closed
wants to merge 2 commits into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Oct 24, 2017

Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Oct 24, 2017
@danbev danbev added the http2 Issues or PRs related to the http2 subsystem. label Oct 24, 2017
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.
@danbev danbev changed the title src: add missing semicolon to debug statement src: fix http2 debug build errors Oct 24, 2017
@@ -89,7 +89,7 @@ ssize_t Http2Session::OnCallbackPadding(size_t frameLen,
Context::Scope context_scope(context);

#if defined(DEBUG) && DEBUG
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
// CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
Copy link
Member

Choose a reason for hiding this comment

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

I think
CHECK(object->Has(context, env()->ongetpadding_string().FromJust()));
is the right one. Without which, the whole expression was evaluated to be a value type, while we expect to have a boolean type for the CHECK.

Copy link
Member

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

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

LGTM with the comment addressed

@@ -89,7 +89,7 @@ ssize_t Http2Session::OnCallbackPadding(size_t frameLen,
Context::Scope context_scope(context);

#if defined(DEBUG) && DEBUG
CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
// CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
Copy link
Member

Choose a reason for hiding this comment

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

This should be

CHECK(object()->Has(context, env()->ongetpadding_string()).FromJust());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I was missing where object was coming from. Will update shortly.

@apapirovski
Copy link
Member

apapirovski commented Oct 24, 2017

I would like to see this land in less than 48 hours, pending a CI run, if no one objects. Feel free to use the 'confused' emoji to let me know otherwise :)

@addaleax
Copy link
Member

Landed in a9f5084, thanks!

@addaleax addaleax closed this Oct 24, 2017
addaleax pushed a commit that referenced this pull request Oct 24, 2017
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

PR-URL: #16432
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@apapirovski apapirovski mentioned this pull request Oct 26, 2017
2 tasks
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

PR-URL: nodejs/node#16432
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request Oct 30, 2017
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

PR-URL: nodejs#16432
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@gibfahn gibfahn mentioned this pull request Oct 31, 2017
@danbev danbev deleted the http2_core_inl-debug-build branch November 16, 2017 08:39
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
Currently building with debug enabled produces the following errors:

In file included from ../src/node_http2.h:6:
../src/node_http2_core-inl.h:465:18: error: expected ';' after do/while
statement
  CHECK_GT(id, 0)
                 ^
                 ;
../src/node_http2_core-inl.h:469:18: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                 ^
../src/node_http2_core-inl.h:469:34: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                 ^
../src/node_http2_core-inl.h:469:47: error: use of undeclared identifier
'spec'
  OnPriority(id, spec.stream_id, spec.weight, spec.exclusive);
                                              ^

This commit adds the missing semicolon to fix the above error.

../src/node_http2.cc:92:9: error: reference to non-static member
function must be called; did you mean to call
      it with no arguments?
  CHECK(object->Has(context, env()->ongetpadding_string()).FromJust());
        ^~~~~~
../src/util.h:120:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {
\
                   ^~~~
../src/util.h:107:44: note: expanded from macro 'UNLIKELY'

For this issue I was not sure what the correct check would be so I've
just commented it out and will update after feedback.

PR-URL: nodejs/node#16432
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants