Skip to content

Don't precompile on pub get/upgrade by default #2277

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

Merged
merged 6 commits into from
Dec 12, 2019

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Dec 10, 2019

And only precompile the single desired executable on pub run.

Following the suggestion from the discussion on #1683 (comment) we avoid printing "precompiling executable..." on pub run if we don't have a terminal attached. That allows pub run to be used in scripts without polluting stdout but still explains the user where time is going on first run of eg. pub run test.

This PR does not change pub global behavior. We probably want to continue recompiling all executables on pub global activate.

This PR still allows --precompile for those who prefer the old behavior.

@sigurdm sigurdm requested a review from jonasfj December 10, 2019 13:45
Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

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

I see a possible corner case around packages and executables that doesn't exist. That might be worth exploring, otherwise this LGTM.

help: "Precompile executables in immediate dependencies.");
defaultsTo: false,
help: "Precompile executables in immediate dependencies.\n"
"If false executables will be precompiled on first run.");
Copy link
Member

Choose a reason for hiding this comment

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

nit: Maybe something like:

If not given, executables will be precompiled by 'pub run'

We can also omit this completely.. But flags aren't really set false, they are more like given or not given.. or...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Omitted it.

help: "Precompile executables in immediate dependencies.");
defaultsTo: false,
help: "Precompile executables in immediate dependencies.\n"
"If false executables will be precompiled on first run.");
Copy link
Member

Choose a reason for hiding this comment

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

nit, see other comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

omitted it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants