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

execption after dart --observe bin/dev.dart #106

Closed
timeshift92 opened this issue May 31, 2019 · 11 comments

Comments

@timeshift92
Copy link

@timeshift92 timeshift92 commented May 31, 2019

error replay stages:

  1. angel init
  2. and choose (3 graphl and 1 basic)
  3. dart --observe bin/dev.dart
  4. open browser

`[SEVERE] angel_project: type 'HttpResponseContext' is not a subtype of type 'StreamConsumer' of 'streamConsumer'

type 'HttpResponseContext' is not a subtype of type 'StreamConsumer' of 'streamConsumer'
dart:async Stream.pipe
package:angel_framework/src/core/response_context.dart 318:30 ResponseContext.streamFile
package:angel_static/src/virtual_directory.dart 244:17 VirtualDirectory.serveFile
package:angel_static/src/virtual_directory.dart 134:20 VirtualDirectory.serveStat
package:angel_static/src/virtual_directory.dart 124:18 VirtualDirectory.servePath
package:angel_static/src/virtual_directory.dart 80:12 VirtualDirectory.handleRequest
package:angel_framework/src/core/server.dart 248:27 Angel.getHandlerResult
package:angel_framework/src/core/server.dart 271:12 Angel.executeHandler
package:angel_framework/src/core/driver.dart 362:32 Driver.runPipeline
package:angel_framework/src/core/driver.dart 138:18 Driver.handleRawRequest...handle
dart:async _CustomZone.run
package:angel_framework/src/core/driver.dart 230:25 Driver.handleRawRequest..`

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented May 31, 2019

Sent this earlier, but it seems Github did not process the e-mail:

This was actually mentioned recently in the chat. It seems that the semantics of StreamSink have changed in Dart 2.3.

If you’re willing, this will be an extremely easy PR for angel-dart/framework - just add StreamConsumer to the implements list and if should just work.

That being said, I've patched this up now. Not yet published to Pub, as I'm rolling some other changes.

@thosakwe thosakwe closed this May 31, 2019
@timeshift92

This comment has been minimized.

Copy link
Author

@timeshift92 timeshift92 commented May 31, 2019

thanks!, if you interested i fix this bug:
before
file.openRead().pipe(this);
after
return this.addStream(file.openRead()).then((_) => this.close());

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented May 31, 2019

@timeshift92

This comment has been minimized.

Copy link
Author

@timeshift92 timeshift92 commented May 31, 2019

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented May 31, 2019

PR = pull request

The fix is shipped in package:angel_framework version 2.0.2.

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented Jun 6, 2019

Finally tracked down the true source of this issue:

Until then, a lot of things will be broken.

@thosakwe thosakwe reopened this Jun 6, 2019
@timeshift92

This comment has been minimized.

Copy link
Author

@timeshift92 timeshift92 commented Jun 6, 2019

Thank you for the work, I hope they will fix it soon, and I also wanted to ask:
there is a project https://www.prisma.io/
it generates ORM for javascript and go if you can make a parser for dart

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented Jun 6, 2019

Not really sure what Prisma is, but I don’t use it, and probably wouldn’t write a parser for it for free. If you really want to use it, you should either write it yourself, or request whoever makes Prisma to port it to Dart. There is already an ORM for Angel, and little to no incentive to invest dozens of unpaid hours into writing a new one.

Sorry if this sounds rude, but maintaining Angel is already a large effort for a single person, and I simply can’t afford to add another huge undertaking to my plate.

@timeshift92

This comment has been minimized.

Copy link
Author

@timeshift92 timeshift92 commented Jun 6, 2019

I understand, thanks for the cordial response =)

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented Jun 7, 2019

Thanks for understanding!

@thosakwe

This comment has been minimized.

Copy link
Member

@thosakwe thosakwe commented Jul 4, 2019

Closing this, as it's been resolved.

@thosakwe thosakwe closed this Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.