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

Implement command "unpack" #4111

Merged
merged 10 commits into from
Feb 15, 2024
Merged

Implement command "unpack" #4111

merged 10 commits into from
Feb 15, 2024

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Jan 15, 2024

Fixes #4102

test/testdata/goldens/help_test/pub unpack --help.txt Outdated Show resolved Hide resolved
test/testdata/goldens/help_test/pub unpack --help.txt Outdated Show resolved Hide resolved
test/testdata/goldens/help_test/pub unpack --help.txt Outdated Show resolved Hide resolved
test/testdata/goldens/help_test/pub unpack --help.txt Outdated Show resolved Hide resolved

@override
String get description => 'Downloads a package and unpacks it in place.\n'
'Will resolve dependencies in the folder unless `--no-resolve` is passed.';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the kind of thing where you write:
<summary>\n\n<longer_description>

And shouldn't longer_description include examples, etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added more examples and an extra newline.

@mit-mit
Copy link
Member

mit-mit commented Jan 15, 2024

Nice. Can we bring over the support for --example from https://github.com/dart-lang/pub/pull/4103/files ?

@sigurdm
Copy link
Contributor Author

sigurdm commented Jan 16, 2024

Nice. Can we bring over the support for --example from https://github.com/dart-lang/pub/pull/4103/files

I don't think it will work well - usually the example folder will have a path dependency on the main library, and that cannot resolve if we extract it out of context.

@mit-mit
Copy link
Member

mit-mit commented Jan 16, 2024

I don't think it will work well - usually the example folder will have a path dependency on the main library, and that cannot resolve if we extract it out of context.

Oh, I had not thought of that (but just sampled some top packages, and you are absolutely right; it's very common).

@sigurdm sigurdm requested a review from jonasfj January 22, 2024 11:30
lib/src/command/unpack.dart Show resolved Hide resolved
lib/src/command/unpack.dart Outdated Show resolved Hide resolved
test/unpack_test.dart Outdated Show resolved Hide resolved
lib/src/command/unpack.dart Outdated Show resolved Hide resolved
lib/src/command/unpack.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sigurdm sigurdm merged commit 235e942 into dart-lang:master Feb 15, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pub download command
4 participants