-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dart Compiler bug- include #import('dart:typo'); #203
Comments
This comment was originally written by [email protected] Added Area-Editor, Triaged labels. |
This is an issue with the compiler- not the editor. Removed Area-Editor label. |
This comment was originally written by [email protected] Set owner to @jtmcdole. |
Fixed in r784. Second request under consideration. Added Fixed label. |
John- Dartc is generating a NPE from a different location, "expanded" on line 52 of UrlSource is the source of the NPE instead of the previous trace: java.lang.NullPointerException Added Triaged label. |
NPE is a different bug from the assertion previously made. I will look into this. |
r1553 Added Fixed label. |
… webdev Revisions updated by `dart tools/rev_sdk_deps.dart`. crypto (https://github.com/dart-lang/crypto/compare/7cf89d3..e175a95): e175a95 2022-11-03 Devon Carew refactor tests to use a more compact encoding (#134) dartdoc (https://github.com/dart-lang/dartdoc/compare/179ada0..4b2e01b): 4b2e01b6 2022-11-03 Sam Rawlins Deprecate many elements on ModelElement (#3218) 60cc024a 2022-11-03 Sam Rawlins Make some logging APIs non-nullable (#3245) 01c55118 2022-11-03 István Soós Command-line arguments for limit max file count or total size. (#3231) file (https://github.com/google/file.dart/compare/b2e31cb..b768f79): b768f79 2022-11-07 Devon Carew add dependabot; run the CI weekly (#203) intl (https://github.com/dart-lang/intl/compare/dda8ade..442193c): 442193c 2022-11-07 Fernando Andrade Fix typo on readme (#506) shelf (https://github.com/dart-lang/shelf/compare/592656f..5fd2593): 5fd2593 2022-11-07 Kevin Moore latest mono_repo d1d8dc5 2022-11-07 Kevin Moore shelf: fix lints (#307) 64255e5 2022-11-03 Nate Bosch Prepare to publish shelf_web_socket (#305) test (https://github.com/dart-lang/test/compare/173a36f..f3fb3ab): f3fb3ab6 2022-11-05 stnamco add lack of description to configuration document (#1782) test_descriptor (https://github.com/dart-lang/test_descriptor/compare/66f14ce..13dbc20): 13dbc20 2022-11-07 Kevin Moore update lints (#45) webdev (https://github.com/dart-lang/webdev/compare/069b870..47c1c33): 47c1c33 2022-11-04 Anna Gringauze Added issue references and removed unused library (#1752) 542db40 2022-11-04 Anna Gringauze Update analysis options in dwds (#1777) 1a36ec8 2022-11-03 Elliott Brooks (she/her) Send debug info from injected client to the debug extension (#1772) Change-Id: I65dca831c71fa9487d663cc2a808b78b64424072 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268360 Auto-Submit: Devon Carew <[email protected]> Commit-Queue: Devon Carew <[email protected]> Reviewed-by: Kevin Moore <[email protected]> Commit-Queue: Kevin Moore <[email protected]>
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/e8d00c0..5cfb1f3): 5cfb1f36 2023-08-07 Sam Rawlins Bump to analyzer 6.1.0 (#3474) ffi (https://github.com/dart-lang/ffi/compare/f01dfca..e2c01a9): e2c01a9 2023-08-08 Slava Egorov Expose pointer to free from allocators (#203) http (https://github.com/dart-lang/http/compare/7e9ed12..9f167a7): 9f167a7 2023-08-08 Alex James Remove example test from java_http (#1001) test (https://github.com/dart-lang/test/compare/5d571d6..9b1828f): 9b1828f4 2023-08-09 Nate Bosch Send a MessagePort to host on frame startup (#2072) ae2ab1ee 2023-08-08 Jacob MacDonald publish test_core v0.5.6 (#2076) 2e9bba21 2023-08-08 Jacob MacDonald fix failing casts when talking to minified apps from the host (#2075) tools (https://github.com/dart-lang/tools/compare/f14bf2e..295ff92): 295ff92 2023-08-10 Elias Yishak Fix empty string for `CLIENT_ID` from being sent when user decides to opt in (#144) bc6c9f0 2023-08-09 Elias Yishak Clean up on dart docs across all dart files under lib (#142) Change-Id: I75147259ce51f240c1dc359896ec7709bada288f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319783 Commit-Queue: Daco Harkes <[email protected]> Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Auto-Submit: Devon Carew <[email protected]>
…mime, protobuf, pub_semver, sse, string_scanner, term_glyph, test, test_reflective_loader, typed_data, vector_math, web, webdriver Revisions updated by `dart tools/rev_sdk_deps.dart`. browser_launcher (https://github.com/dart-lang/browser_launcher/compare/f60df1d..c68ec25): c68ec25 2023-12-04 Kevin Moore drop outdated lints ecosystem (https://github.com/dart-lang/ecosystem/compare/805ab4f..79a1bc5): 79a1bc5 2023-12-01 dependabot[bot] Bump coverallsapp/github-action from 2.2.1 to 2.2.3 (#204) c51c500 2023-12-01 dependabot[bot] Bump actions/github-script (#202) 64eeeee 2023-12-01 dependabot[bot] Bump peter-evans/create-or-update-comment (#203) 32461a7 2023-12-01 Moritz Upgrades to `health.yaml` (#201) http_multi_server (https://github.com/dart-lang/http_multi_server/compare/2238a6b..ae48489): ae48489 2023-12-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#61) markdown (https://github.com/dart-lang/markdown/compare/3774ad0..d2e7903): d2e7903 2023-12-01 dependabot[bot] Bump subosito/flutter-action from 2.11.0 to 2.12.0 (#569) 42d32cb 2023-11-30 Kevin Moore Update to latest lints, require Dart ^3.1 (#568) mime (https://github.com/dart-lang/mime/compare/8ebf946..56359b0): 56359b0 2023-12-05 Yoshihiro Tanaka Detect HEIC/HEIF format by checking header bytes (#109) protobuf (https://github.com/dart-lang/protobuf/compare/dcec2ed..bb19774): bb19774 2023-11-29 Ömer Sinan Ağacan Revert `PbMap._wrappedMap` empty map value (#904) cf43230 2023-11-23 Ömer Sinan Ağacan Update getList and getMap return types (#903) 4e0bdff 2023-11-23 Ömer Sinan Ağacan Make wrapped lists in PbList monomorphic (#902) pub_semver (https://github.com/dart-lang/pub_semver/compare/f9e94ee..4572181): 4572181 2023-12-04 Kevin Moore drop outdated lints (#96) sse (https://github.com/dart-lang/sse/compare/1df63f2..8d2e2f0): 8d2e2f0 2023-12-01 dependabot[bot] Bump nanasess/setup-chromedriver (#99) c6501b3 2023-12-01 Kevin Moore Drop unneeded dep on pkg:test (#98) string_scanner (https://github.com/dart-lang/string_scanner/compare/a7105ef..ebc30a3): ebc30a3 2023-12-04 Kevin Moore Update to latest lints and cleanup (#67) term_glyph (https://github.com/dart-lang/term_glyph/compare/7c1eb9d..4c5a496): 4c5a496 2023-12-04 Kevin Moore drop outdated lints (#46) test (https://github.com/dart-lang/test/compare/a0a4d1e..9fffb48): 9fffb489 2023-12-01 dependabot[bot] Bump github/codeql-action from 2.22.5 to 2.22.8 (#2145) test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/17d40bb..6edf535): 6edf535 2023-11-30 Kevin Moore Update lints, bump min SDK to ^3.1.0 (#56) typed_data (https://github.com/dart-lang/typed_data/compare/0b16bd2..6f6d81d): 6f6d81d 2023-12-04 Kevin Moore drop outdated lints (#78) vector_math (https://github.com/google/vector_math.dart/compare/cca3cf1..38a00c3): 38a00c3 2023-12-04 Kevin Moore Update to latest lints and cleanup (#309) cedd304 2023-12-04 dependabot[bot] Bump actions/checkout from 4.1.0 to 4.1.1 (#307) web (https://github.com/dart-lang/web/compare/cffc2e3..865aeaf): 865aeaf 2023-12-01 Devon Carew update the CI workflow to test the generation script (#112) webdriver (https://github.com/google/webdriver.dart/compare/43ed1db..2c1b6f8): 2c1b6f8 2023-12-01 dependabot[bot] Bump nanasess/setup-chromedriver (#290) dc988d7 2023-12-01 Devon Carew update to the latest package:lints (#291) Change-Id: I2d898b6d772925146630777ef587d29a05288a3b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339720 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Devon Carew <[email protected]>
What steps will reproduce the problem?
In a Dart file that is compilable and has no errors or warnings include an extra #import('dart:typo'); at the top of the file where "dart:typo" is not a valid dart library.
What is the expected output? What do you see instead?
An error or warning should be propagated instead of exceptions.
Also, in order to handle this use-case with the DeltaProcessor in the Dart Editor, if the LibrarySource class had an extra method to prompt if the URI is valid [before calling LibrarySource.getImportFor()] then the Dart Editor would be much more robust for this kind of typo. (For more information on this use-case in the Dart Editor, contact [email protected].)
Please use labels and text to provide additional information.
Stack Trace:
!ENTRY com.google.dart.tools.core 4 4 2011-10-21 14:14:21.239
!MESSAGE Exception while building file:/Users/jwren/dart/HelloWorld/HelloWorld.dart
!STACK 0
java.lang.RuntimeException: Don't know how to expand dart URI: dart:jsona
at com.google.dart.compiler.SystemLibraryManager.expandRelativeDartUri(SystemLibraryManager.java:133)
at com.google.dart.compiler.UrlSource.<init>(UrlSource.java:51)
at com.google.dart.compiler.UrlLibrarySource.<init>(UrlLibrarySource.java:17)
at com.google.dart.compiler.DefaultCompilerConfiguration.getSystemLibraryFor(DefaultCompilerConfiguration.java:211)
at com.google.dart.compiler.DartCompilerMainContext.getSystemLibraryFor(DartCompilerMainContext.java:185)
at com.google.dart.compiler.DartCompiler$Compiler.updateLibraries(DartCompiler.java:353)
at com.google.dart.compiler.DartCompiler$Compiler.updateAndResolve(DartCompiler.java:198)
at com.google.dart.compiler.DartCompiler$Compiler.compile(DartCompiler.java:165)
at com.google.dart.compiler.DartCompiler$Compiler.access$3(DartCompiler.java:162)
at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1110)
at com.google.dart.compiler.DartCompiler.compileLib(DartCompiler.java:1086)
at com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities.secureCompileLib(DartCompilerUtilities.java:752)
at com.google.dart.tools.core.internal.builder.DartBuilder.buildLibrary(DartBuilder.java:326)
at com.google.dart.tools.core.internal.builder.DartBuilder.buildAllApplications(DartBuilder.java:253)
at com.google.dart.tools.core.internal.builder.DartBuilder.build(DartBuilder.java:227)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The text was updated successfully, but these errors were encountered: