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
{{ message }}
Repository navigation
Switch to using "dart create" instead of stagehand for newer SDK versions #3179
uninstall the broken stagehand (broken now because pub no longer exists):
Can you clarify what you're seeing here? I deactivated stagehand and ran Dart: New Project but it re-activated and worked as expected. I don't think it's intended that it should have stopped working yet. Are you seeing errors?
Yes there is a package named stagehand that is now legacy and won't be maintained by the home team, and installs broken because it depends on "pub" existing, which is going away. "dart pub create" has replaced it, and already diverges on the kinds of templates to use. stagehand works for you because you still have a legacy "pub" command installed. I don't, deliberately for testing, although I can symlink it back in when I'm desperate.
and installs broken because it depends on "pub" existing, which is going away
I'm a little confused - are you saying that this will break, or it is broken?
My understanding is that the pub command is not going to disappear anytime soon (that would be quite breaking). The goal is to move to dart xxx commands, but that's not something that needs to happen urgently. However if something is broken today then that very much needs fixing right away.
If today, you install the Flutter distro, and add its one bin to your PATH ($SDK_PATH/bin), you will get the flutter and dart commands, and the fully functional dart SDK, but no pub command. This is by design. stagehand has gone away, pub has gone away, and even "dart global activate" is broken because it writes a bin that includes "pub" instead of "dart pub". (I haven't tested flutter global activate, because it's broken by installing in a separate directory that's not ~/.pub-cache, but that's a separate issue.)
So, even today, if you start from scratch, and then use pub global, that will fail, and if you use dart pub global, that seems to fail as well. You should try "dart create" first.
I'm still a little confused about whether there's a bug here, or this is a request to change something for the future.
Dart-Code should never calls pub from Flutter's bin folder, nor directly from PATH. It should always use the Dart SDK's bin folder.
If you can reproduce an error or something broken, please provide exact steps as that's much more urgent to fix than moving over to new commands/templates. Thanks!
changed the title [-]Internal stagehand access should be replaced with new "dart pub create" call.[/-][+]Switch to using "dart create" instead of stagehand for newer SDK versions[/+]on Mar 29, 2021
I've renamed this as a general issue to support dart create for newer SDKs since I don't think there's anything wrong with the existing code, it should just be migrated for the future (see dart-archive/stagehand#671).
Activity
DanTup commentedon Mar 7, 2021
Can you clarify what you're seeing here? I deactivated stagehand and ran Dart: New Project but it re-activated and worked as expected. I don't think it's intended that it should have stopped working yet. Are you seeing errors?
RandalSchwartz commentedon Mar 7, 2021
Yes there is a package named stagehand that is now legacy and won't be maintained by the home team, and installs broken because it depends on "pub" existing, which is going away. "dart pub create" has replaced it, and already diverges on the kinds of templates to use. stagehand works for you because you still have a legacy "pub" command installed. I don't, deliberately for testing, although I can symlink it back in when I'm desperate.
DanTup commentedon Mar 8, 2021
I'm a little confused - are you saying that this will break, or it is broken?
My understanding is that the
pubcommand is not going to disappear anytime soon (that would be quite breaking). The goal is to move todart xxxcommands, but that's not something that needs to happen urgently. However if something is broken today then that very much needs fixing right away.Thanks!
RandalSchwartz commentedon Mar 12, 2021
If today, you install the Flutter distro, and add its one bin to your PATH ($SDK_PATH/bin), you will get the flutter and dart commands, and the fully functional dart SDK, but no pub command. This is by design. stagehand has gone away, pub has gone away, and even "dart global activate" is broken because it writes a bin that includes "pub" instead of "dart pub". (I haven't tested flutter global activate, because it's broken by installing in a separate directory that's not ~/.pub-cache, but that's a separate issue.)
So, even today, if you start from scratch, and then use pub global, that will fail, and if you use dart pub global, that seems to fail as well. You should try "dart create" first.
DanTup commentedon Mar 12, 2021
I'm still a little confused about whether there's a bug here, or this is a request to change something for the future.
Dart-Code should never calls
pubfrom Flutter'sbinfolder, nor directly fromPATH. It should always use the Dart SDK's bin folder.If you can reproduce an error or something broken, please provide exact steps as that's much more urgent to fix than moving over to new commands/templates. Thanks!
[-]Internal stagehand access should be replaced with new "dart pub create" call.[/-][+]Switch to using "dart create" instead of stagehand for newer SDK versions[/+]DanTup commentedon Mar 29, 2021
I've renamed this as a general issue to support
dart createfor newer SDKs since I don't think there's anything wrong with the existing code, it should just be migrated for the future (see dart-archive/stagehand#671).Add support for "dart create" for >= v2.13 SDKs
Add support for "dart create" for >= v2.13 SDKs