-
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
pub crashes or freezes when using dependency_overrides (Dart 1.7-dev.4.5) #21298
Comments
Bob, do you have any insights into what's going on here? cc @ricowind. |
Seems to be a problem for multiple users (at least two). Bumping priority to make sure we figure out if this is a release blocker. Removed Priority-High label. |
This comment was originally written by @alan-knight Bob and Nathalie are both unavailable. I'll see what I can figure out. Preliminary comments |
This comment was originally written by luiz....@gmail.com I've take another look at error1, and it seems to be related to the .pub directory (removing it solves the problem). I've removed this folder from the repository, considering it was unrelated, but you can retrieve it checking out the initial commit: git checkout 5e4684d38e523b145012aa772e00c0a3b323d9be Also, the workaround for error2 worked for me. Thanks. |
This comment was originally written by @alan-knight
The solver is backtracking indefinitely and not able to solve the version constraints, but I think that may be due to the specific constraints involved with the overrides. The constraint problems seem likely to involve the analyzer version, which is where a lot of the backtracking is happening. By fiddling around with the pubspecs in the overrides (removing the version numbers in their pubspecs and setting all the dependencies to any, plus something else that I now can't seem to get to happen again) I was able to get it to resolve, but it used analyzer version 18 and other back-level versions. I'm not good enough at reading pub solver logs to figure out where the issue is. If this resolved with older versions there might be a behaviour change in pub which is the reason. One that I know of is that (I believe) it now treats 0.22.0-dev.1 as being >= 0.22.0, where previous releases treated it as less than 0.22.0. But if that's the reason I don't know why that would make it solve successfully if something had already been resolved without the overrides. So I'm going to say that without more information these don't look like release-blocking problems, but it would be good if Bob or Nathalie would weigh in. |
This comment was originally written by @alan-knight Ok, if I check out that version I can reproduce error1. And pub cache repair doesn't help. So that's worth looking into. |
This comment was originally written by luiz....@gmail.com I've added another scenario to the repository (error3), but this one doesn't involve the dependency_overrides option. If you run pub get in error3/, it'll show the following error: Incompatible version constraints on analyzer:
The problem is that the pubspec.yaml file contains only one package that depends on code_transformers (di). If you remove the di package from the dependencies list, and run pub deps, you won't see both code_transformers or analyzer in the package tree. test 0.0.1 I hope that helps to figure out what's going on. |
This comment was originally written by javiers...@gmail.com Just encountered an error that seems to be like this one, more similar to the 3º error described. Just downloaded a few minutes ago the version 1.7.0-dev.4.5 version of the bundle (sdk, editor, dartium). My dependencies file: name: Arquitecture Note: doing the hack to make it work in Ubuntu 13.10, 14.04, 14.10 and mints (https://code.google.com/p/dart/issues/detail?id=12325). The pub --trace 'get' output: Resolving dependencies... NoSuchMethodError: method not found: 'map' ---- Log transcript ---- ---- End log transcript ---- Best regards. |
This comment was originally written by @alan-knight Javi - that sounds like error1. Did you try deleting the .pub directory (and probably do a pub cache repair just for good measure) and retrying? |
This comment was originally written by @alan-knight Luiz. I think this is not a pub bug but a version constraint issue that there aren't valid versions for what you're looking for. I think the root cause is known, which is that analyzer is revving rapidly, and lots of things depend on it. So, I don't know the whole cause, but if you look at the trace I haven't followed this all the way through, but basically I think this is pushing it onto old versions of everything. I'm suspicious that the quickest answer is di to allow the latest analyzer, or grinder to allow older versions of args. |
This comment was originally written by luiz.min...@gmail.com Thanks! You are right. Using an older version of grinder (which requires an older version of args) solves the problem. |
This comment was originally written by javiers...@gmail.com Alan - Deleting the .pub_cache and the .pub directories did the trick is this behaviour known or if encounter this again should report it, because last time it happened after just a few minutes of use. Thanks. |
This comment was originally written by whesse@chromium.org I can reproduce the issue on MacOS, using the git checkout from luizmineo, at revision5e4684d38e523b145012aa772e00c0a3b323d9be The problem persists if the bin and deps directories are deleted from .pub, and even if transformers/transformers.snapshot is deleted. It is caused somehow by the manifest.txt file in .pub/transformers. It would be easier to debug this with instructions for running pub from the files in sdk/lib/_internal/pub_generated in the repository, rather than from the sdk (which uses a snapshot, I think), because then debug code could be added to detect from which point the exception is thrown. |
I can't reproduce this on Linux, but I'll try to work with Alan to figure out what's going on. |
Managed to find a repro, will have a patch shortly. Added Started label. |
Fixed in r41087. Added Fixed label. |
The fix has been pushed to the dev channel in 1.7.0-dev.4.6. Is it possible for you to verify that it works, Luiz? |
This comment was originally written by luiz.m...@gmail.com I'm no longer able to reproduce error1 with 1.7.0-dev.4.6, so I can confirm that it was fixed. However, I'm still able to reproduce error2 (but I can workaround it as Alan suggested). Should I open another bug for it? |
This issue has been moved to dart-lang/pub#1163. |
This issue was originally filed by luiz....@gmail.com
I'm trying to upgrade my applications to Dart 1.7, but I'm having some problems when using the dependency_overrides option with the latest sdk.
To better illustrate these problems, I've created a github repository that simulates my development enviroment (It's just a bunch of folders with pubspec.yaml files):
https://github.com/luizmineo/dart-pub-errors
When running pub get in error1/test, it shows the following message:
Changed 1 dependency!
The null object does not have a method 'map'.
NoSuchMethodError: method not found: 'map'
Receiver: null
Arguments: [Closure: (dynamic) => dynamic]
This is an unexpected error. Please run
pub --trace 'get'
and include the results in a bug report on http://dartbug.com/new.
Running the pub --trace 'get' command produces the attached error.
The second error is more complicated. If you run pub get in error2/test, it won't crash, but will hang for about 20 minutes, and exits with the follwing message:
Resolving dependencies... (13:27.3s)
Connection closed before full header was received
Attachment:
error_log.txt (7.84 KB)
The text was updated successfully, but these errors were encountered: