8000 stream_processor: fixed bison deprecation warning by LionelCons · Pull Request #5675 · fluent/fluent-bit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stream_processor: fixed bison deprecation warning #5675

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LionelCons
Copy link
Contributor

This fixes the first warning reported in #4427.

Signed-off-by: Lionel Cons lionel.cons@cern.ch

@LionelCons LionelCons requested a review from koleini as a code owner July 5, 2022 08:46
@LionelCons LionelCons changed the title fixed bison deprecation warning stream_processor: fixed bison deprecation warning Jul 5, 2022
Signed-off-by: Lionel Cons <lionel.cons@cern.ch>
@nokute78
Copy link
Collaborator
nokute78 commented Jul 5, 2022

@LionelCons Thank you for contribution.
The warning is removed on Ubuntu 18.04.
https://github.com/fluent/fluent-bit/runs/7193062830?check_suite_focus=true#step:5:1387

On the other hand, I tested on Ubuntu 20.04 and there was below warning.
Hmm, does the warning depend on a version of bison or flex ?

[ 30%] Linking C static library ../../library/libflb-ra-parser.a
[ 30%] Built target flb-ra-parser
[ 30%] [FLEX][lexer] Building scanner with flex 2.6.4
[ 30%] [BISON][parser] Building parser with bison 3.5.1
sql.y:1.1-22: warning: deprecated directive: ‘%name-prefix "flb_sp_"’, use ‘%define api.prefix {flb_sp_}’ [-Wdeprecated]
    1 | %name-prefix "flb_sp_"  // replace with %define api.prefix {flb_sp_}
      | ^~~~~~~~~~~~~~~~~~~~~~
      | %define api.prefix {flb_sp_}
sql.y: warning: 7 shift/reduce conflicts [-Wconflicts-sr]
sql.y: warning: 6 reduce/reduce conflicts [-Wconflicts-rr]
sql.y: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]
Scanning dependencies of target flb-sp-parser

@LionelCons
Copy link
Contributor Author

It is likely that the warnings are version specific.

However, the same construct is used in three different files:

$ grep -R name-prefix *
lib/cmetrics/src/cmt_decode_prometheus.y:%name-prefix "cmt_decode_prometheus_"
src/record_accessor/ra.y:%name-prefix "flb_ra_"
src/stream_processor/parser/sql.y:%name-prefix="flb_sp_"  // replace with %define api.prefix {flb_sp_}

Do you see multiple name-prefix warnings on Ubuntu 20.04?

@nokute78
Copy link
Collaborator
nokute78 commented Jul 5, 2022

@LionelCons Yes.
I also found below warnings on Ubuntu 20.04.

[ 11%] [FLEX][cmt_decode_prometheus_lexer] Building scanner with flex 2.6.4
cmt_decode_prometheus.l:196: warning, -s option given but default rule can be matched
[ 11%] [BISON][cmt_decode_prometheus_parser] Building parser with bison 3.5.1
cmt_decode_prometheus.y:2.1-37: warning: deprecated directive: ‘%name-prefix "cmt_decode_prometheus_"’, use ‘%define api.prefix {cmt_decode_prometheus_}’ [-Wdeprecated]
    2 | %name-prefix "cmt_decode_prometheus_"
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | %define api.prefix {cmt_decode_prometheus_}
cmt_decode_prometheus.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
cmt_decode_prometheus.y: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]
Scanning dependencies of target cmetrics-static
[ 29%] Built target maxminddb
[ 29%] [FLEX][lexer] Building scanner with flex 2.6.4
[ 29%] [BISON][parser] Building parser with bison 3.5.1
ra.y:2.1-22: warning: deprecated directive: ‘%name-prefix "flb_ra_"’, use ‘%define api.prefix {flb_ra_}’ [-Wdeprecated]
    2 | %name-prefix "flb_ra_"
      | ^~~~~~~~~~~~~~~~~~~~~~
      | %define api.prefix {flb_ra_}
ra.y: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]

@LionelCons
Copy link
Contributor Author

So the change (to make all 3 instances of name-prefix consistent) works fine on Ubuntu 18.04 while another change will be needed for Ubuntu 20.04.

Copy link
Collaborator
@nokute78 nokute78 left a comment

Choose a reason for hiding this comment

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

@LionelCons Thank you. This patch is for Ubuntu 18.04.
We need another fix for Ubuntu 20.04.

@github-actions
Copy link
Contributor
github-actions bot commented Oct 4, 2022

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Oct 4, 2022
@github-actions github-actions bot removed the Stale label Aug 15, 2024
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 27, 2024
@github-actions github-actions bot removed the Stale label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0