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

Logged exception with the import of valid library in workspace. #306

Closed
jwren opened this issue Nov 1, 2011 · 7 comments
Closed

Logged exception with the import of valid library in workspace. #306

jwren opened this issue Nov 1, 2011 · 7 comments
Labels
closed-invalid Closed as we don't believe the reported issue is generally actionable

Comments

@jwren
Copy link
Member

jwren commented Nov 1, 2011

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)

@bwilkerson
Copy link
Member

Set owner to @bwilkerson.

@bwilkerson
Copy link
Member

Could not reproduce.


Set owner to @jwren.
Added Invalid label.

@jwren
Copy link
Member Author

jwren commented Nov 2, 2011

Removed the owner.
Added Triaged label.

@jwren
Copy link
Member Author

jwren commented Nov 2, 2011

Steve was able to reproduce this issue.

@bwilkerson
Copy link
Member

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.

@stevemessick
Copy link
Contributor

Removed the owner.

@bwilkerson
Copy link
Member

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.

@jwren jwren added Type-Defect closed-invalid Closed as we don't believe the reported issue is generally actionable labels Dec 6, 2011
pq added a commit that referenced this issue Sep 23, 2016
* 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 .
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-invalid Closed as we don't believe the reported issue is generally actionable
Projects
None yet
Development

No branches or pull requests

3 participants