Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dependency should trim package names #3735

Closed
JCKodel opened this issue Dec 17, 2021 · 1 comment
Closed

Add Dependency should trim package names #3735

JCKodel opened this issue Dec 17, 2021 · 1 comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Milestone

Comments

@JCKodel
Copy link

JCKodel commented Dec 17, 2021

Describe the bug
Dart: Add Dependency and Dart: Add Dev Dependency don't find the package if there are spaces after the name of the packet, failing silently (it outputs that the package doesn't exist only in the output panel).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://pub.dev/packages/awesome_select'
  2. Double click on the package name (awesome_select). Notice that the browser automatically selects the space after the package name (at least in Edge).
  3. Use the Dart: Add Dependency option and paste (it will paste with the trailing space)
  4. Package installation fails because it doesn't trim the spaces

Expected behavior
Automatically space trimming (to improve productivity: [F1], [Enter], [Ctrl+V], [Enter], we're done, fast fast)
Also, it would be nice a red toast telling me that package was not found.

Screenshots
image

There is really a space here >.< It should be on the version side, not on the title, but, nothing we can do to change the source.

Versions (please complete the following information):

  • VS Code version: 1.63.2
  • Dart extension version: 3.29.0
  • Dart/Flutter SDK version: 2.8.0
@JCKodel JCKodel added the is bug label Dec 17, 2021
@DanTup DanTup added in commands Relates to commands (usually invoked from the command Palette) is enhancement and removed is bug labels Dec 17, 2021
@DanTup DanTup added this to the v3.32.0 milestone Dec 17, 2021
@DanTup DanTup closed this as completed in 18b7dda Dec 17, 2021
@bean5
Copy link

bean5 commented Jan 18, 2022

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Projects
None yet
Development

No branches or pull requests

3 participants