-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
I was recently surprised that a package I published failed to install via pub global activate
.
My issue was that I had some shared code in libraries within the bin/
folder that are not binaries themselves. When I ran pub global activate
I saw that precompilation failed on those libraries. I was surprised by this because the libraries were not listed in the executables section in the pubspect.yaml file and because, during development, activating via path (pub global activate -s path ...
) gives no warning of the issue.
My workaround is to move the shared code under bin/src/
. However, I wonder:
- Chould we detect libraries without a main and skip precompilation for those? Or
- Chould we detect the issue earlier, either when activating a path or when validating a package before it's published?
To reproduce this, try:
pub global activate dart2js_info 0.6.0
and you'll see errors like:
Failed to precompile dart2js_info:deferred_library_check:
Dart_LoadScriptFromKernel: The binary program does not contain 'main'.
Metadata
Metadata
Assignees
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)