dart-lang / webdev

A CLI for Dart web development.
https://pub.dev/packages/webdev
212 stars 75 forks source link

Is workspace supported? #2496

Closed arnaud-secondlayer closed 1 month ago

arnaud-secondlayer commented 2 months ago

I've started to use dartlang workspace feature in our repo ( https://github.com/dart-lang/sdk/issues/53875 ). When I run webdev on a repo with resolution: workspace, I get the error message:

Waiting for webdev serve to start...
webdev could not run in the current directory.
Cannot open file
  pubspec.lock
parlough commented 1 month ago

\cc @sigurdm

bkonyi commented 1 month ago

Since taking over webdev, I'm not aware of any work that's been done related to workspaces in the tool. @sigurdm, I'm assuming we'll need to make some changes to support this?

sigurdm commented 1 month ago

Yeah - I haven't looked deeply yet. But I guess we have to remove assumptions about the location of .dart_tool/package_config.json and pubspec.lock somewhere.

With workspaces we cannot assume that they are located next to pubspec.yaml, but we have to keep looking up the file hierarchy until we find it.

I hope to get to look into this later this week.

bkonyi commented 1 month ago

Thanks for the fix @sigurdm! This feature is going out with the next stable, right? I'll make a point to publish this soon.

sigurdm commented 1 month ago

It is already available (though not announced) in 3.5, but yeah - we plan to announce it with 3.6