Conversation
Co-authored-by: exaby73 <50555895+exaby73@users.noreply.github.com>
Co-authored-by: exaby73 <50555895+exaby73@users.noreply.github.com>
exaby73
requested changes
Nov 20, 2025
Comment on lines
67
to
72
| // Build the dart run arguments, including --packages if found | ||
| final runArgs = ['run', '-r']; | ||
| if (packageConfig != null) { | ||
| runArgs.addAll(['--packages=$packageConfig']); | ||
| } | ||
| runArgs.add(serverFile.path); |
Collaborator
There was a problem hiding this comment.
Can you extract this into a private method to dedupe code here?
Contributor
Author
There was a problem hiding this comment.
Done! Extracted into _buildDartRunArgs() private method in commit 0b07cbb.
…cation Co-authored-by: exaby73 <50555895+exaby73@users.noreply.github.com>
exaby73
approved these changes
Nov 20, 2025
Co-authored-by: exaby73 <50555895+exaby73@users.noreply.github.com>
Copilot
AI
changed the title
fix: Resolution of package_config.json in arcade serve
Add --packages flag to dart run in arcade serve for Dart 3.10 compatibility
Nov 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dart 3.10's resident frontend compiler (
-rflag) breaksIsolate.resolvePackageUri, causing it to returnnull. The workaround is passing--packages=<path>todart run. In Dart workspaces,package_config.jsonmay be in a parent directory.Changes
packages/arcade_cli/lib/utils.dart: AddedfindPackageConfig()to recursively search parent directories for.dart_tool/package_config.jsonpackages/arcade_cli/lib/commands/serve.dart:_buildDartRunArgs()helper to construct dart command with--packagesflagpackages/arcade_cli/test/utils_test.dart: Test coverage for package config resolution scenariosExample
Running from a workspace subdirectory now generates:
Original prompt
.dart_tool/package_config.jsoninarcade serve#55✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.