You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dart_frog build fails when run in a pub workspace package.
The issue seems to be that a pub workspace will only generate one global pbspec.lock file for the entire repository. Therefore, the post gen hook of the dart_frog_prod_server mason module fails.
dart_frog build
✓ Installing dependencies (3.4s)
✓ Bundling sources (0.2s)
An exception occurred while executing hook:REDACTED/.mason-cache/bundled/dart_frog_prod_server_0.1.0+1_8f9e5f00a1ad5ac6fe64824ffeb33163fed9b0ba/hooks/pre_gen.dart.
Error: PathNotFoundException: Cannot open file, path = 'REDACTED/packages/api/pubspec.lock' (OS Error: No such file or directory, errno = 2)
Steps To Reproduce
create a dart pub workspace mono repo
cd packages/api (the package our server code is living in)
dart_frog build ⚡
Expected Behavior
dart_frog manages to build the server code.
Additional Context
For reference, pub workspaces are the new dart native mono repo management, which is currently in preview since dart 3.5.
More info at: https://flutter.dev/go/pub-workspace
The text was updated successfully, but these errors were encountered:
In talking with the team we do believe that this is a valid bug as we have not added in support for Workspaces at this time to any of our packages. The main reason for this is that overall the Workspaces feature is still experimental from the Dart team. This was pointed out by the team in the post announcing the 3.5 release
We believe the fundamental solution is to create a single, shared resolution of the versions of each dependency in such repos, and are working on such a capability via a new pub feature called workspaces. We’ll have much more to share about this in our next Dart release, but for now you can go ahead and see how this was recently applied to the Flutter engine repo.
Given this, I'm going to leave the issue open as it is valid but we won't plan on re-evaluating it until the Workspace feature is complete and fully launched by the Dart team.
Description
dart_frog build
fails when run in a pub workspace package.The issue seems to be that a pub workspace will only generate one global
pbspec.lock
file for the entire repository. Therefore, the post gen hook of thedart_frog_prod_server
mason module fails.Steps To Reproduce
cd packages/api
(the package our server code is living in)dart_frog build
⚡Expected Behavior
dart_frog manages to build the server code.
Additional Context
For reference, pub workspaces are the new dart native mono repo management, which is currently in preview since dart 3.5.
More info at: https://flutter.dev/go/pub-workspace
The text was updated successfully, but these errors were encountered: