dart, polymer build failure, can'tfind polymer/polymer.dart? - dart

I have a project that was building fine a few days ago, since then I haven't changed my dart-sdk or any library dependencies or update dart editor to my knowledge, I just made a very small change to one of my polymer elements to use paper-buttons instead of standard buttons, the change can be seen here
Now when I run pub build I get the following errors, and I have no idea why, if I look in packages polymer/polymer.dart does exist and dart editor doesn't show any warnings in the project. similarly if I undo my latest changes and go back to my last working version I still get this exact same error, so I'm not sure how to debug this, any hints would be much appreciated.
Can't read 'package:polymer/polymer.dart' (Could not find asset polymer|lib/polymer.dart.).
import 'package:polymer/polymer.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For such weird problems it's often a good idea to try pub cache repair.
I found an open issue with the same error message: http://dartbug.com/20285
Check if pub get or pub upgrade show some warnings, errors, ...

Related

Angular dart on WebStorm. Debug is no more working

It is a week now that I have problems debugging angular dart applications in WebStorm. If I use debug on a console (server) application everything works fine.
I tried to roll back to angular 4.0.0 (on dart 1.24.3), but this didn't help.
I really don't know what kind of info could be useful.
Please, let me know if there is some configuration file that I can print or that could be important in order to fix the problem. I tested a lot of configurations, but, at present, I'm not able to work properly. After filling up my code with print statements, there are some cases where also this practice is not enough.
Edit1:
I have tried to create a sample project. With no DDc and target chrome, the debugger stops but not on all breakpoints. With no DDc and target Dartium, it does not stop.
Edit 2:
I was running my application with target dartium, because with target chrome I had an annoying error that I was not able to catch. Now I got it, and running the project with target chrome, revives the debugger. This is a good new. Just a question, is a problem of release 1.24.3 (Dartium has not been released for this release) or something else? Anyway, if this is a known problem, it wouldn't be better to disable the target dartium on WebStorm when the release is 1.24.3?
Edit 3:
Now the debugger is working, but only on the project you are developing. The imported packages are not stopping on breakpoints. As my project is divided in a lot of packages, I cannot debug approximately 80% of my code.
Am I doing something wrong?
What you are hitting here isn't functionality directly in an Angular Dart or Dart issue, but in the JS Debugger in WebStorm.
Open an issue on YouTrack here: https://youtrack.jetbrains.com/issues
Include not only the version of Angular and the Dart SDK, but also the version of WebStorm, and an example of where breakpoints are not working.
Finally, there is some information in this issue that might help: https://youtrack.jetbrains.com/issue/WEB-30593

Nativescript with AppBuilder plugin update

I am developing an app using nativescript with AppBuilder and Visual Studio. I am using a plugin called nativescript-pdf-view (https://github.com/Merott/nativescript-pdf-view). Everything worked fine until Apple changed one of their methods in xCode 8. See http://fluentreports.com/blog/?p=401 for details.
I have submitted a question to the author of the plugin 5 days ago, but have not received an answer yet, so I decided to make the change in the plugin code myself. The change is very simple, but after the update when I load the app to my test device, I still get the same error.
My question is: How does AppBuilder build plugins? Is it enough to update source code of the plugin to update it? How can I force the AppBuilder to rebuild this plugin?
I have a feeling the the plugin is cached somewhere because I get the same error message and stack trace even though the source code is changed.
Any suggestions are greatly appreciated.
In order to use a custom plugin in your project you have to update the reference in your package.json. For example in your case, you can:
Get the source code of nativescript-pdf-view.
Fix the issue you've noticed.
Build a .tgz from your modified source code (npm pack command should help you to create a .tgz).
Include the .tgz in your project (for example at the root level, right next to package.json).
Reference the .tgz in your package.json, so instead of having "nativescript-pdf-view": "1.0.0", you should have "nativescript-pdf-view": "file:nativescrip-pdf-view.tgz".
Build your project.
This way the custom plugin will be used instead of the one from npm.
There's no caching of plugins in the cloud builds. The process uses your package.json to install required dependencies.

Couldn't get Xamarin projects working with Rider-EAP on OSX

I was really excited, when JetBrains launched the Project Rider-EAP. First thing I've tried was to get a Xamarin-iOS project to run in Rider-EAP, but it doesn't work out of the box.
Update 1: This issue is now listed as critical bug with fix in EAP 2: https://youtrack.jetbrains.com/issue/RIDER-618
1. Problem (fixed) Projects didn't load with the exception that Xamarin.iOS.targets could not be found.
I fixed this with a simple Symlink:
ln -s /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/ “/Applications/Rider EAP.app/Contents/lib/ReSharperHost/macos-x64/mono/lib/mono/xbuild/”
2. Problem
References are not loaded correctly. Therefore the whole syntax highlighting and everything beyond is broken.
See screenshot: References are not loaded correctly
I get the following error as well:
Error:null: Error initializing task MakeDir: Could not load file or assembly '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Tasks.dll' or one of its dependencies
Switching the xbuild to mono 4.2.2 removes the error but not solves the problem.
PS: It seams that the references are loaded correctly for Xamarin Android projects.
Basic Xamarin Support like open and build is added with EAP 8 of Project Rider.
More advanced features will come with the next Builds and are tracked here: https://youtrack.jetbrains.com/issue/RIDER-1533

Why am I getting an outdated pub package dialogue?

I am using the current version of Dart 1.7.0_dev. When I attempt to add a pub package I am getting the attached dialogue - an old version.
Even with a new install of Dart, I am getting it. I would like to use the new one that gave me a the previous dialogue that suggest the package while the name of the package is being entered.
It appears as if this is cached and I can' seem to get rid of it.

Why does the first step in the "Get Started With Web UI" tutorial cause an error and what does the error mean?

I'm going through the "targets" (tutorials) at dartlang.org. I'm at Target 6: Get Started with Web UI and have run into an error at step #1 under the section "Set up background compilation in Dart Editor".
Could someone explain why this error is happening, or what I could do to resolve it? The error is below.
Error setting breakpoint at 'main': 'package:logging/logging.dart':
Error: line 250 pos 24: wrong number of type arguments in type 'Comparable'
class Level implements Comparable<Level> {
^
I have not changed anything in any logging package, nor messed with any Comparable class. What gives?
Take a look at this question. I actually don't know why is this happening(If someone of the dart dev team is reading this, please, explain us :D), but it seems that they changed the Comparable interface structure in M3, and forgot to update the logging package ;)
To solve your problem, go to the "logging.dart" file and make this change:
FROM:
class Level implements Comparable<Level> {
TO:
class Level implements Comparable {
This is probably related to incompatibilities between the version of the SDK you are running and the version of web_ui. If you have the most recent version of both, they work together. If you don't want to use the most recent versions, then you have to explicitly manage the versions in your pubspec.yaml file.
I'm using Dart Editor version: 0.4.0_r18915 and web_ui version: 0.4.0
and it works fine.
Try getting the most recent version of Dart Editor, remove the pubspec.lock file, and run pub install again.
Meanwhile, I will figure out how to strengthen the language in the tutorial about managing versions.
Hope this helps.
mem

Resources