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

Suppress warning from FE when VM+FE is used to execute code #31552

Closed
keertip opened this Issue Dec 5, 2017 · 5 comments

Comments

5 participants
@keertip
Contributor

keertip commented Dec 5, 2017

Issue 31480 moves the warning generated by FE during execution to stderr. There are cases when we want to suppress these warning all together - analysis, running tests.

Add a flag to FE to suppress warnings to be used when vm is invoked with --dfe flag?

@keertip keertip added this to the 2.0-alpha milestone Dec 5, 2017

@keertip

This comment has been minimized.

Show comment
Hide comment
@keertip
Contributor

keertip commented Dec 5, 2017

@peter-ahe-google

This comment has been minimized.

Show comment
Hide comment
@peter-ahe-google

peter-ahe-google Dec 6, 2017

Contributor

I agree that flag is nice to have. We've previously had problems building compilers on top of the VM when it emits warnings that can't be suppressed. For example, if the VM emits a warning when running dart2js, a user of dart2js may think that the warning is about their code.

Contributor

peter-ahe-google commented Dec 6, 2017

I agree that flag is nice to have. We've previously had problems building compilers on top of the VM when it emits warnings that can't be suppressed. For example, if the VM emits a warning when running dart2js, a user of dart2js may think that the warning is about their code.

@kmillikin

This comment has been minimized.

Show comment
Hide comment
@kmillikin

kmillikin Dec 12, 2017

Member

Would it be enough to have a Dart environment variable (const bool.fromEnvironment) or an OS environment variable (Platform.environment) that we could set from a script or on the command line? That would be very easy to add.

Plumbing a flag from the VM to the FE isolate seems more complicated, and we might want to delegate that to the VM team if it's what we actually need.

Member

kmillikin commented Dec 12, 2017

Would it be enough to have a Dart environment variable (const bool.fromEnvironment) or an OS environment variable (Platform.environment) that we could set from a script or on the command line? That would be very easy to add.

Plumbing a flag from the VM to the FE isolate seems more complicated, and we might want to delegate that to the VM team if it's what we actually need.

@peter-ahe-google

This comment has been minimized.

Show comment
Hide comment
@peter-ahe-google

peter-ahe-google Dec 12, 2017

Contributor

Relying on environment variables tends lead to problems long term. People set these environment variables because one person tells them to, and then they don't notice errors in another project the next day.

Contributor

peter-ahe-google commented Dec 12, 2017

Relying on environment variables tends lead to problems long term. People set these environment variables because one person tells them to, and then they don't notice errors in another project the next day.

@a-siva a-siva assigned bkonyi and unassigned kmillikin Dec 12, 2017

whesse pushed a commit that referenced this issue Dec 20, 2017

Added flag --suppress_cfe_warnings to suppress warnings generated by …
…the common front end. Fixes issue #31552.

Bug:
Change-Id: Ia025fa2feaec20cbada1596fb022b70e69501ede
Reviewed-on: https://dart-review.googlesource.com/30385
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>

@bkonyi bkonyi assigned kmillikin and unassigned bkonyi Dec 20, 2017

@a-siva a-siva added the p1-high label Dec 20, 2017

@kmillikin kmillikin added this to Incoming in Dart Front End Jan 3, 2018

@kmillikin kmillikin moved this from Incoming Untriaged to Triaged in Dart Front End Jan 3, 2018

@kmillikin

This comment has been minimized.

Show comment
Hide comment
@kmillikin

kmillikin Jan 3, 2018

Member

@bkonyi plumbed the flag through the VM to Fasta. I will implement code to respect it in Fasta.

Member

kmillikin commented Jan 3, 2018

@bkonyi plumbed the flag through the VM to Fasta. I will implement code to respect it in Fasta.

@kmillikin kmillikin moved this from Triaged to In Progress in Dart Front End Jan 3, 2018

whesse pushed a commit that referenced this issue Jan 4, 2018

Respect --suppress-fe-warnings in the front-end isolate
Closes issue #31552.

Bug: #31552
Change-Id: I6e6c8b1aadadf096966bff6def81127e4186f82a
Reviewed-on: https://dart-review.googlesource.com/32240
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>

@kmillikin kmillikin closed this Jan 4, 2018

@kmillikin kmillikin moved this from In Progress to Done in Dart Front End Jan 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment