Skip to content

Package dependency scripts are re-compiled on every run #50617

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

Closed
jakemac53 opened this issue Dec 2, 2022 · 4 comments
Closed

Package dependency scripts are re-compiled on every run #50617

jakemac53 opened this issue Dec 2, 2022 · 4 comments
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@jakemac53
Copy link
Contributor

jakemac53 commented Dec 2, 2022

I have a hunch this is related to the fact that dart run now runs a pub get on every single call.

To repro, on the latest dev (2.19.0-440.0.dev, not sure about older versions), just run dart test in any project that depends on package:test. You will see output like this each time:

Resolving dependencies in <your-package>... 
Got dependencies in <your-package>!
Building package executable... (6.2s)
Built test:test.

But it should only be rebuilding when the dependency is modified (package deps change).

I am marking this as a P1 because it causes a very significant downgrade to the experience of using package:test or any other command line tool - the compile step takes many seconds.

cc @jonasfj @sigurdm @mit-mit

@jakemac53 jakemac53 added P1 A high priority bug; for example, a single project is unusable or has many test failures area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. labels Dec 2, 2022
@jakemac53
Copy link
Contributor Author

We also seem to have lost the ability to do incremental rebuilds in pub

@jakemac53
Copy link
Contributor Author

Fwiw I tried on stable (2.18.5) and it still emits the Built test:test. line, but it is much faster (sub second).

@jonasfj
Copy link
Member

jonasfj commented Dec 2, 2022

I have a hunch this is related to the fact that dart run now runs a pub get on every single call.

Yeah, fixed in:
dart-lang/pub@04f7bce

Only affected pre-releases (so SDK builds).

I think we've rolled it into the SDK today or yesterday.

copybara-service bot pushed a commit that referenced this issue Dec 13, 2022
Bug: #50617
Change-Id: Ibe6f6e9d5cd58d7c16e150978cb6b021d46fbda6
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/273223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273743
Reviewed-by: Alexander Thomas <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
@jakemac53
Copy link
Contributor Author

Closing this as I can confirm that it is fixed in the latest dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

2 participants