-
Notifications
You must be signed in to change notification settings - Fork 33
I'm not able to launch any Polymer 1.0.0-rc.10 in Dartium #665
Comments
The 'Bad state' message you mention is produced by the package reflectable, and this happens when an untransformed program that uses 'package:reflectable/reflectable.dart' is executed from the target directory for the build process (for a file 'web/foo.dart' that would be 'build/web/foo.dart' or a file derived from that by compilation to JavaScript). This usually means that an entry point should be added to 'entry_points', as indicated in the message. But if this happens in a setup where transformation has previously been used successfully it probably means that the transformation fails. I have just discovered that we have test failures with reflectable: Every test fails, and we have not made any changes to reflectable since we had a state where they all succeeded. I've verified that all the tests are again running successfully if we add a version constraint such that the analyzer version 0.27.1 is used, rather than 0.27.1+1. It looks like 0.27.1+1 reintroduces the problem that forced reflectable to limit the version of the analyzer to 0.26.1+14 for some weeks. So you may be able to resolve the problem for now by adding the following to your 'pubspec.yaml':
|
I just tried it but with analyzer
|
We couldn't use 0.27.0 so 0.27.1 is the most relevant version to consider. The usage of a getter The change from analyzer 0.26.1+14 to 0.27.1 was accompanied by a rather large number of version changes in other packages, so there are many potential sources of conflict. |
I get an error message because of dart-archive/initialize#43, but the The dependencies:
analyzer: '^0.27.0' This is why I tried this version as well. I guess this should be updated then? |
Yes, the published version 0.5.0 of reflectable claims that it depends on analyzer version '^0.27.0'; it was published after a number of iterations where the analyzer would return null for a number of queries (esp. when evaluating the value of constants at compile-time), and 0.27.1 was the first version where that issue was resolved (after 0.26.1+15 where it was introduced). You are right that it would be more correct to use '>=0.27.1 <0.28.0' than '^0.27.0'. Will do that in the next commit of reflectable. Right now I think the first priority is to find a way to make things work for you and others who depend on the analyzer, directly or indirectly. The obvious remedy would be a 'dependency_overrides' section forcing version 0.27.1 of the analyzer, but given that this creates other problems for you it is not a complete solution (even though it changes test runs from universally failing to universally succeeding for reflectable itself). I don't have any precise ideas about how the issues you see can be solved right now, but it would be useful to know which file (F) contains the usage of I suspect that the In any case, the next step would be to make the most recent commit of reflectable on github work, and then the published version. But if there is going to be a hotfix version (say, 0.27.1+2) of the analyzer available later today then maybe it would be better to keep reflectable unchanged, rather than freezing everything at 0.27.1 by inserting a very narrow version constraint into reflectable. So I'd like to avoid inserting an "analyzer version freeze constraint" into reflectable at least for some hours. |
Thanks a lot for investigating and your quick response (as usual 👍 ). I'll commit a repo project later.
|
Thanks for the kind words! If you keep using Polymer rc.9 for now then you won't get the updates associated with analyzer 0.27.* (in particular "the new task model"), and that basically means you'll delay using a lot of new code for a while (the choice implies that you'll stay with analyzer 0.26.1+14, code_transformers 0.2.*, reflectable 0.4.0). That should be a quite well-tested combination of versions. About ^version: I found the documentation in the mean time (https://www.dartlang.org/tools/pub/dependencies.html), and the wording is '^version means “the range of all versions guaranteed to be backwards compatible with the specified version”' which should allow for anything up to the next major number. So indeed ^0.27.1 is the same thing as '>=0.27.1 <0.28.0'. Until I found that, I was a little worried that it might mean '>=0.27.1 <0.27.2'. ;) Looking at your stack trace too briefly, I first assumed that '_BootstrapFileBuilder._readAnnotations' would be in generated code, but looking again I can see that it is fact in package initialize. Checking out the version of initialize that uses 0.27.*, that is initialize version 0.6.2, I cannot find any locations in _readAnnotations that calls any method named
I don't think that this version of initialize could ever make such a call. Btw, the method So does your version actually contain initialize version 0.6.2? If it uses an older version of initialize then it should contain a constraint '<0.27.0' about analyzer, so you should not be able to have such a combination. |
Ah, you wouldn't by any chance have a 'dependency_overrides' section that forces an older version of initialize? That would break the interaction with the analyzer, so basically you couldn't do that unless you would force all the other versions back to "somewhere before analyzer 0.27.0", which is essentially the same thing is as using rc.9. ;-) |
To me it looks like you can fetch initialize version 0.6.2 (I just did "git clone 'https://github.com/dart-lang/initialize.git'"), insert 'dependency_overrides' for 'initialize' on the appropriate local 'path:' and another one saying 'analyzer: 0.27.1', and then pub build at least creates transformed code. That should eliminate the initial "Bad state: Reflectable has not been initialized." problem, and then you might have a working setup based on rc.10. The point is that 'initialize' 0.6.2 won't work when fetched by |
I guess I'll skip that. |
@zoechi can you try deleting your |
@jakemac53 tryied it and even if |
@dam0vm3nt did you also try fixing analyzer to |
after deleting the |
... and I can confirm it works like a charm with |
To be more precise :
|
see dart-lang/pub#1369 for the pub get error |
Reflectable 0.5.1 has been published today. It insists on analyzer 0.27.1, so there should be no need for By the way, I still don't understand how |
The set has does have a solution, thete is just an error message because of a path dependency (looks like a |
Aha, so it is indeed because the 2nd run does not run the same checks. Btw, Jacob has reported the 'dev_dependencies' error message about 'path's. |
This should all be fixed |
Switching to rc.9 makes it work again.
The text was updated successfully, but these errors were encountered: