-
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
Logged exception with the import of valid library in workspace. #306
Comments
Set owner to @bwilkerson. |
Removed the owner. |
Steve was able to reproduce this issue. |
I tried again this morning to reproduce the problem but was not able to do so. If you can reproduce it then please add the stack trace information to this issue and change the area to Compiler. If not, please close this case. (I am creating a separate issue for the source range reported with the "duplicate definition of main" error.) Set owner to @stevemessick. |
Removed the owner. |
I tried again to re-produce this bug and was unable to do so. If this is still a problem please re-open the bug and assign it to me (with detailed steps for how to reproduce it). Added Invalid label. |
* Fixed cast exception in `dart_type_utilities` (#27405). * New `parameter_assignments` lint. * New `prefer_final_fields` lint. * New `prefer_final_locals` lint. * Markdown link fixes in docs (#306). * Miscellaneous solo test running fixes and introduction of `solo_debug` (#304). R=scheglov@google.com Review URL: https://codereview.chromium.org/2369463003 .
When a user imports an additional library into their library, i.e. the addition of the line "#import('../MyLib/MyLib.dart');", the stack trace below is spit out. To have this happen, the second library should have a main method as well.
Two problems were created, both with the label "duplicate definition of main".
To easily reproduce create 2 applications with the New Application wizard, then have one point to the other.
!ENTRY com.google.dart.tools.core 1 0 2011-11-01 13:06:24.354
!MESSAGE No source associated with compilation error (1): duplicate definition of main
!STACK 0
java.lang.RuntimeException: No source associated with compilation error (1): duplicate definition of main
at com.google.dart.tools.core.internal.builder.CompilerListener.getResource(CompilerListener.java:88)
at com.google.dart.tools.core.internal.builder.CompilerListener.processError(CompilerListener.java:112)
at com.google.dart.tools.core.internal.builder.CompilerListener.onError(CompilerListener.java:65)
at com.google.dart.compiler.DartCompilerMainContext.onError(DartCompilerMainContext.java:65)
at com.google.dart.compiler.resolver.TopLevelElementBuilder.compilationError(TopLevelElementBuilder.java:94)
at com.google.dart.compiler.resolver.TopLevelElementBuilder.declare(TopLevelElementBuilder.java:102)
at com.google.dart.compiler.resolver.TopLevelElementBuilder.fillInUnitScope(TopLevelElementBuilder.java:86)
at com.google.dart.compiler.resolver.TopLevelElementBuilder.fillInLibraryScope(TopLevelElementBuilder.java:74)
at com.google.dart.compiler.DartCompiler$Compiler.buildLibraryScopes(DartCompiler.java:423)
at com.google.dart.compiler.DartCompiler$Compiler.updateAndResolve(DartCompiler.java:211)
at com.google.dart.compiler.DartCompiler$Compiler.compile(DartCompiler.java:166)
at com.google.dart.compiler.DartCompiler$Compiler.access$3(DartCompiler.java:163)
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:737)
at com.google.dart.tools.core.internal.builder.DartBuilder.buildLibrary(DartBuilder.java:356)
at com.google.dart.tools.core.internal.builder.DartBuilder.buildAllApplications(DartBuilder.java:275)
at com.google.dart.tools.core.internal.builder.DartBuilder.build(DartBuilder.java:249)
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: