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

Warnings when compiling core libraries #1060

Closed
devoncarew opened this issue Jan 5, 2012 · 12 comments
Closed

Warnings when compiling core libraries #1060

devoncarew opened this issue Jan 5, 2012 · 12 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug

Comments

@devoncarew
Copy link
Member

When compiling a helloworld html application, we get the following warnings from non-user code:

dart://htmlimpl/htmlimpl.dart/generated/src/wrapping/_IDBKeyRangeWrappingImplementation.dart(33:33): Parameter 'bound' is hiding 'METHOD bound' at _IDBKeyRangeWrappingImplementation.dart:IDBKeyRangeWrappingImplementation:18:15
dart://htmlimpl/htmlimpl.dart/generated/src/wrapping/_IDBKeyRangeWrappingImplementation.dart(45:33): Parameter 'bound' is hiding 'METHOD bound' at _IDBKeyRangeWrappingImplementation.dart:IDBKeyRangeWrappingImplementation:18:15
dart://htmlimpl/htmlimpl.dart/generated/src/wrapping/_StorageWrappingImplementation.dart(17:25): Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:StorageWrappingImplementation:21:10
dart://htmlimpl/htmlimpl.dart/generated/src/wrapping/_StorageWrappingImplementation.dart(25:26): Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:StorageWrappingImplementation:21:10
dart://htmlimpl/htmlimpl.dart/generated/src/wrapping/_StorageWrappingImplementation.dart(30:23): Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:StorageWrappingImplementation:21:10
dart://htmlimpl/htmlimpl.dart/src/DocumentFragmentWrappingImplementation.dart(86:9): Local variable 'last' is hiding 'METHOD last' at DocumentFragmentWrappingImplementation.dart:FilteredElementList:110:11
dart://htmlimpl/htmlimpl.dart/src/ElementWrappingImplementation.dart(136:11): Local variable 'last' is hiding 'METHOD last' at ElementWrappingImplementation.dart:_ChildrenElementList:143:11
dart://htmlimpl/htmlimpl.dart/src/NodeWrappingImplementation.dart(136:11): Local variable 'last' is hiding 'METHOD last' at NodeWrappingImplementation.dart:_ChildrenNodeList:143:8

It's a bit confusing for the user since they can't do anything about the errors.

@rakudrama
Copy link
Member

We need a way to suppress this warning at the library level to get rid of this problem.

The VM/Frog/Leg/Dartc all need a common mechanism for suppressing warnings so I can suppress a warning once.

Basically, without a suppression mechanism, we are asking machine generated code to pass 'lint'. That places an unreasonable burden on the generator.

While it is possible to change the generator, that is not a good idea.
I don't know what a reasonable mechanical replacement policy is. The replacement name, e.g. 'bound$1' or whatever, will show up as a completion suggestion in the editor, so we should rather stick with the name that comes from the WebKit IDL and is used the W3C or WebKit documentation.


Added Area-Compiler, Triaged labels.

@DartBot
Copy link

DartBot commented Jan 5, 2012

This comment was originally written by mmendez@google.com


Section 3.1 on Scoping calls out the warning at least as I read it. I think that section 4 of the spec should define a way to suppress them so we can be consistent.


cc @gbracha.
Removed Area-Compiler label.
Added Area-Language label.

@DartBot
Copy link

DartBot commented Jan 5, 2012

This comment was originally written by mmendez@google.com


We can also suppress the warning in this case if a spec change is contentious.

@gbracha
Copy link
Contributor

gbracha commented Jan 5, 2012

Changing this to a feature request. It is part of a much larger issue of how to deal with warnings. And yes, a spec change is contentious.


Removed Type-Defect label.
Added Type-Enhancement label.

@lukechurch
Copy link
Contributor

I'd request that this issue be made a priority.

It's damaging to user experience to have warnings thrown on a hello world application - esp. as it will immediately train them to ignore warnings. I very much want to avoid that, esp. as warning arguably matter more in Dart than many other languages due to the type system.


Removed Priority-Medium label.
Added Priority-High label.

@DartBot
Copy link

DartBot commented Jan 9, 2012

This comment was originally written by mmendez@google.com


Konstantin, could we suppress this warning for the dom library only? Please assign back to gilad once the warning is suppressed.


Set owner to @scheglov.

@devoncarew
Copy link
Member Author

We added some code to the editor (http://codereview.chromium.org/9030024/) to ignore warnings from dart: code. This is intended to be a relatively temporary fix until a more permanent solution is found.

@DartBot
Copy link

DartBot commented Jan 9, 2012

This comment was originally written by mmendez@google.com


I think that we should also suppress warnings for the generated dom code in dartc as well until we get some allowance in the spec for formal suppression.

@scheglov
Copy link
Contributor

scheglov commented Jan 9, 2012

http://codereview.chromium.org/9149008

DartC will not show warning for library htmlimpl.dart now.


Set owner to @gbracha.

@rakudrama
Copy link
Member

I get the same warnings in dart:dom

The code is similar to htmlimpl, but a separate library.

  RULE dart_generated_sources_dart_binding_356 out/Release/obj/gen/webcore/bindings/DartDOMWindowWebAudio.cpp
  RULE dart_generated_sources_dart_binding_366 out/Release/obj/gen/webcore/bindings/DartDOMWindowWebSocket.cpp
  ACTION Compiling dart system libraries out/Release/obj.target/dartc/geni/dartc/api/dart/core/com/google/dart/corelib/corelib.dart.api
make: Nothing to be done for DumpRenderTree'. make: Nothing to be done forchrome'.
dart://dom/dom/generated/src/wrapping/_IDBKeyRangeWrappingImplementation.dart:44: Parameter 'bound' is hiding 'METHOD bound' at _IDBKeyRangeWrappingImplementation.dart:_IDBKeyRangeWrappingImplementation:26:15 (sourced from dart://dom/dom/dom.dart)
    43:
    44: IDBKeyRange lowerBound(IDBKey bound, [bool open = null]) {
dart://dom/dom/generated/src/wrapping/_IDBKeyRangeWrappingImplementation.dart:59: Parameter 'bound' is hiding 'METHOD bound' at _IDBKeyRangeWrappingImplementation.dart:_IDBKeyRangeWrappingImplementation:26:15 (sourced from dart://dom/dom/dom.dart)
    58:
    59: IDBKeyRange upperBound(IDBKey bound, [bool open = null]) {
dart://dom/dom/generated/src/wrapping/_InjectedScriptHostWrappingImplementation.dart:59: Parameter 'num' is hiding 'CLASS num' at ../../../../../../core/com/google/dart/corelib/corelib.dart/src/num.dart:num:3:11 (sourced from dart://dom/dom/dom.dart)
    58:
    59: Object inspectedNode(int num) {
dart://dom/dom/generated/src/wrapping/_StorageWrappingImplementation.dart:23: Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:_StorageWrappingImplementation:28:10 (sourced from dart://dom/dom/dom.dart)
    22:
    23: String getItem(String key) {
dart://dom/dom/generated/src/wrapping/_StorageWrappingImplementation.dart:33: Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:_StorageWrappingImplementation:28:10 (sourced from dart://dom/dom/dom.dart)
    32:
    33: void removeItem(String key) {
dart://dom/dom/generated/src/wrapping/_StorageWrappingImplementation.dart:39: Parameter 'key' is hiding 'METHOD key' at _StorageWrappingImplementation.dart:_StorageWrappingImplementation:28:10 (sourced from dart://dom/dom/dom.dart)
    38:
    39: void setItem(String key, String data) {


Set owner to @scheglov.

@scheglov
Copy link
Contributor

http://code.google.com/p/dart/source/detail?r=3146

OK, dom.dart is now ignored too.


Set owner to @gbracha.

@gbracha
Copy link
Contributor

gbracha commented May 23, 2012

Added Fixed label.

@devoncarew devoncarew added Type-Enhancement P1 A high priority bug; for example, a single project is unusable or has many test failures area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels May 23, 2012
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
dart-bot pushed a commit that referenced this issue Jul 16, 2020
Change-Id: I7a2bcc85731e426c6d0073d65c06878f917d6627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154681
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
dart-bot pushed a commit that referenced this issue Apr 7, 2021
2021-04-07 irina.arkhipets@gmail.com Fixes #535: more nnbd tests for constant evaluation added.
2021-04-07 sgrekhov@unipro.ru Fixes #1068. Remove excessive - in a SharedOptions
2021-04-05 irina.arkhipets@gmail.com Fixes #535: more nnbd tests for constant evaluation added.
2021-04-05 irina.arkhipets@gmail.com Fixes #996: more tests added.
2021-04-05 irina.arkhipets@gmail.com Fixes #996: more tests added.
2021-04-05 irina.arkhipets@gmail.com Fixes #1067: added checks for old and new dart versions.
2021-04-05 irina.arkhipets@gmail.com Fixes #1066: added @Dart=2.12 to the initial version of the test, new test which checks recent dart behavior added.
2021-04-05 irina.arkhipets@gmail.com Fixes #1057: Expected result doe the tests with mailformed types updated.
2021-04-02 sgrekhov@unipro.ru Fixes #1062. Remove unnecessary assignment
2021-04-01 irina.arkhipets@gmail.com Fixes #1057: Expected result doe the tests with mailformed types updated.
2021-04-01 sgrekhov@unipro.ru Expected error code is fixed for Windows
2021-04-01 sgrekhov@unipro.ru Fixes #1060. Expected error message position updated
2021-04-01 sgrekhov@unipro.ru Fixes #1059. Expected error message updated
2021-04-01 sgrekhov@unipro.ru Fixes #1024. Adjust expected results for web platforms
2021-04-01 sgrekhov@unipro.ru #993. More Array tests added
2021-03-31 58489007+franklinyow@users.noreply.github.com Update LICENSE
2021-03-31 sgrekhov@unipro.ru #993. Array tests added
2021-03-31 irina.arkhipets@gmail.com Issue #1053: Missing Issue tag added, test expectation updated.
2021-03-30 irina.arkhipets@gmail.com Fixes #1054: Updated expectations for mailformed raw type variables.
2021-03-30 irina.arkhipets@gmail.com Fixes #1050: Updated expectations for mailformed raw type variables.
2021-03-30 irina.arkhipets@gmail.com Fixes #1050: Got rid of mailformed row type variable usage in i-2-b- tests.
2021-03-29 sgrekhov@unipro.ru Fixes #1043. Remove static warning as an expected result
2021-03-29 irina.arkhipets@gmail.com Fixes #1049: Correct expectation adjusted
2021-03-29 sgrekhov@unipro.ru Fixes #1048. Move tests to correct folder and change the description
2021-03-29 irina.arkhipets@gmail.com Fixes #1046: Test adjusted to work with the generic metadata feature enabled.
2021-03-29 sgrekhov@unipro.ru Fixes #1047. Change expected result to not to fail on JavaScript configurations
2021-03-29 sgrekhov@unipro.ru Fixes #1044. Change expected result to not to fail on JavaScript configurations
2021-03-26 irina.arkhipets@gmail.com Fixes #1029: Missing Issue tag added to the test.
2021-03-26 sgrekhov@unipro.ru Fixes #1042. Add check that produces different results for triple and double shifts
2021-03-26 sgrekhov@unipro.ru Fixes #1042. Fix built-in_types_t11.dart to expect correct results
2021-03-25 sgrekhov@unipro.ru Fixes #1019. Don't use type aliases in legacy libraries
2021-03-25 irina.arkhipets@gmail.com Fixes #1039: Old-style aliases corrected.
2021-03-25 sgrekhov@unipro.ru Fixes #988. Expect static type warning in a right way
2021-03-24 irina.arkhipets@gmail.com Issues #1029: Static expectation corrected.
2021-03-24 irina.arkhipets@gmail.com Issues #1035: Issue tag for the bug 45443 added.
2021-03-24 irina.arkhipets@gmail.com Merge branch 'master' of https://github.com/dart-lang/co19
2021-03-24 sgrekhov@unipro.ru #1023. Change SplayTreeMap and SplayTreeSet tests according to the new behavior
2021-03-23 sgrekhov@unipro.ru #1021. Remove expecting errors on web configurations for some negative numbers
2021-03-23 sgrekhov@unipro.ru Fixes #1034. Missed experimental flag added
2021-03-23 sgrekhov@unipro.ru #1033. Perform runtime check on big values for non-JavaScript configurations only
2021-03-23 irina.arkhipets@gmail.com Issues #1029: co19/Language/Generics/Superbounded_types/typedef3_A01_t06/02 corrected and does not expect a compile error now.

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I5fae01c7b48aba502da04638430f4f6de79ac745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194241
Reviewed-by: William Hesse <whesse@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants