Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 07 18:54
    @timsneath banned @hpoit_gitlab
  • Aug 07 18:54
    @timsneath banned @hpoit
  • Jan 31 22:29

    dart-bot on master

    Add pkg/analysis_server/pubspec… (compare)

  • Jan 31 22:12

    dart-bot on master

    First stab at tests for "Spread… (compare)

  • Jan 31 22:10
    jackokring opened #35830
  • Jan 31 21:14

    dart-bot on master

    [vm, gc] Use work stealing for … (compare)

  • Jan 31 21:05

    dart-bot on master

    [vm] Simplify VirtualMemory::Tr… (compare)

  • Jan 31 20:15
    renatoathaydes opened #35829
  • Jan 31 20:13

    dart-bot on master

    [vm] Maintain view-ness of byte… (compare)

  • Jan 31 19:59

    dart-bot on master

    Add the capability in analysis … (compare)

  • Jan 31 19:35
    jmesserly closed #33685
  • Jan 31 19:19
    srawlins opened #35828
  • Jan 31 18:35

    dart-bot on master

    Add a "summary-deps-output" opt… (compare)

  • Jan 31 18:33

    dart-bot on master

    Extract EnumListParameter value… (compare)

  • Jan 31 18:09

    dart-bot on master

    Fix override_on_non_overriding_… (compare)

  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 opened #35827
  • Jan 31 17:23
    srawlins edited #35826
Renato Athaydes
@renatoathaydes
I just need any of them to work... it's just to test.
bpilot
@bpilot
I think so. That's from some code I made to run dart2js output in Node
Renato Athaydes
@renatoathaydes
Wow, it worked :D thanks
bpilot
@bpilot
To get dartdevc working in Node, I hard to write a bunch code to recursively load & execute each ddc.js file. Took my like half a day to get it right. :-D
Renato Athaydes
@renatoathaydes
You should publish a builder for this.
bpilot
@bpilot
But dart2js is pretty basic. You just need to declare some globals it's expecting to see in a browser than Node.js lacks. There might be a way to tell Dart2JS to output Node.js-friendly code though.
Renato Athaydes
@renatoathaydes
so people could do pub run build_runner build and it would spit out a nodejs runnable module.
bpilot
@bpilot
Hmm.
Renato Athaydes
@renatoathaydes
or something like webdev build
so you would do dart2node build :)
bpilot
@bpilot
I'm actually hoping they just add the option to dart2js. I don't know why I can't find it because the test runner already supports Node.js.
What is your motivation for using Dart with node.js?
Renato Athaydes
@renatoathaydes
testing GH Actions
they need to be runnable in node
I'm quite surprised Dart compilers don't transpile to node directly.
bpilot
@bpilot
Ah okay. The reason for me was I have a legacy Node.js application which I'm slowly migrating to Dart, so I need the code to be able to execute inside & interop with JS code.
I am too, especially since the test runner does.
Renato Athaydes
@renatoathaydes
exactly
pub run test -p node works
Renato Athaydes
@renatoathaydes
There's already a package for node interop: https://pub.dev/packages/node_interop
and the builder I was saying we should have: https://pub.dev/packages/build_node_compilers
bpilot
@bpilot
Brilliant find!
imerkle
@imerkle
If I want to send list of ints I can do like asTypedList
But I can't figure how to send list of struct in ffi
imerkle
@imerkle
final ptr = allocate<Uint8>(count: size); final externalTypedData = ptr.asTypedList(size);
I want to implement asTypedList for <T>
Flavian Alexandru
@alexflav23
If a version of webdev is added to dev_dependencies in pubspec.yaml does that forces it to be used and auto-downloaded on every machine? Just been through a catastrophic 2.6.0 update and it’s not making a lot of sense that webdev, build_runner and build_compiler are closely knit together without them being versioned tied as well.
I’m not sure if inside the migthy google this is always remotely built via forge/blaze and therefore this kind of coupled setup is largely irrelevant, it’s certainly looking to behave that way
But it’s certainly a bit of a pain point for all plebs that are confined to forever build locally at dev time :)
Nate Bosch
@natebosch

We agree that the version coupling between webdev and build_runner is a problem - we had hoped that by not expressing it as a pub dependency it would give us leeway for a better UX but that hasn't worked out in practice. We don't have any short term plans here but finding a better way to handle versioning is something that we are interested in improving.

I'm a bit confused about what you mean about it being auto-downloaded on every machine. It is true that if we put more stuff into dev_dependencies that everyone who works on the project and does a pub get would download those packages. It doesn't impact anyone who depends on those packages though, so they don't put a download burden on further downstream stuff.

I'm trying to understand your main concern - is it related to having to download all these packages on each host you work on? Or on a continuous integration environment?

Flavian Alexandru
@alexflav23
Yeah basically
Just had to go round a 10 dev team to do manual webdev bumps
Because post 2.6.0 update it all went kaboom and we were left scratching heads
I’m not sure if there’s a clever way to mitigate that in the short term, outside of Docker boxes or whatever, that would be a time penalty and resource penalty
It stands to reason that if there’s a git committed lock file, all deps should largely look identical. In contrast, something like SBT let’s you define Scala version and whatnot exclusively in project files. If I don’t have the correct “out deps” as a dev checking in a new commit, they get automagically setup
Nate Bosch
@natebosch
I can't think of a good way to mitigate in the short term. Hopefully we're able to find a better way to distribute webdev that makes the updates less painful in the future. It won't reduce the amount of downloading that needs to happen, but hopefully we can avoid those runtime version complains and make it so that a pub get will just get you into a state where things work
Flavian Alexandru
@alexflav23
Downloading is fine, so long as it’s automated.
bpilot
@bpilot
Use dart2js command directly?
Flavian Alexandru
@alexflav23
@natebosch Basically downloading on each machine is the automation dream, just to be clear. E.g new webdev version in the lock, autoresolve. In practice it means of course localsing the webdev launcher to the “project scope”, which could be teh defined folder structure that has a pubspec.yaml at the top level.
That being said, sounds like this is on the roadmap
And we need to wait for a fix
Rob Becker
@robrbecker
@natebosch This ties into what we were looking to do by adding global dependencies in the pubspec.yaml dart-lang/pub#1231 .. @alexflav23 If that’s something you’d like, give that issue a thumbs up.
Simon Binder
@simolus3

@imerkle There's no generic TypedList for Dart objects, and it looks like there's no builtin way to create a pointer-array of structs. I use this workaround to create a pointer from a struct list:

Pointer<T> createArrayPointer<T extends Struct>(List<T> list) {
  final ptr = allocate<T>(count: list.length);
  final size = sizeOf<T>();

  for (var i = 0; i < list.length; i++) {
    final asBytes = ptr.elementAt(i).cast<Uint8>();
    final structData = list[i].addressOf.cast<Uint8>();

    for (var j = 0; j < size; j++) {
      asBytes[j] = structData[j];
    }
  }

  return ptr;
}

You could turn that into a generic List implementation on NativeType

Jacob MacDonald
@jakemac53
Fwiw @alexflav23 @robrbecker you can add webdev to dev_dependencies and run it with pub run webdev. Then you can check in your pubspec.lock file so that all users are using the same pinned version.
Basically use it as a local dev dependency instead of as a global dependency. You could then even add an alias to your .bashrc file for webdev which does pub run webdev if you want the shorter command to run it.
You can do this for any package that would normally be globally activated
Rob Becker
@robrbecker
yeah, I suppose that works
Jonathan White
@ThinkDigitalSoftware
Which repo do I submit an issue in for an invalid refactoring option? It show the option to extract the expression into a variable when it relies on a variable that was created in the inner scope and there’s no valid way to extract this expression into a variable
it exists in both Intellij and VScode
Screen Shot 2019-11-19 at 9.36.29 AM.png