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

Failures when Dart updates #2075

Closed
vsmenon opened this issue Mar 5, 2019 · 5 comments
Closed

Failures when Dart updates #2075

vsmenon opened this issue Mar 5, 2019 · 5 comments

Comments

@vsmenon
Copy link
Member

vsmenon commented Mar 5, 2019

From @drpond1 on November 17, 2018 14:19

When a new version of dart appears eventually my code will not run -- some kind of script error on startup, before it gets to my code. (Unfortunately, I did not save the error.)
This is resolved by updating the dartsdk, getting/updating dependencies and rebuilding.
It seems to me I should still be able to run with the old system. If not, there should at least be a message that a dartsdk update is required.

This is the second time this has happened in the last few months.

I use IntelliJ Community Edition.

Copied from original issue: dart-lang/sdk#35203

@vsmenon
Copy link
Member Author

vsmenon commented Mar 5, 2019

From @alexander-doroshko on March 5, 2019 8:46

@vsmenon, I'm not sure area-intellij is the right label here.
Without error details the issue doesn't seem to be actionable at all, so maybe just close?

@vsmenon
Copy link
Member Author

vsmenon commented Mar 5, 2019

From @drpond1 on March 5, 2019 20:38

I believe this was addressed in a recent related issue. The problem is
that while I am working on a project, there can be an update from Dart
which when a build happens causes builds to fail. I think this is new
with Dart 2.0 because of the recommended

build_runner: ^0.10.0
build_web_compilers: ^0.4.

My situation is that I may keep an older app running,

because I want to copy "user" data from the old/flawed app into the new one.

New builds may fail if there is a Dart update between the time the older app was

started and the new build was attempted. (There cannot be another running

app.)

Because of the build failure, new code executes with a missing file error.


The failure is intended by the Dart design and the

shown pub spec is still recommended so the issue was closed.


The residual problem is that the failures I encountered are unexpected

and recognition of how to recover was not immediately obvious to me.

If this analysis of the problem is correct, the simplest fix is a small

change in documentation.

However, my situation might be sufficiently rare that no change should

be made.

On Tue, Mar 5, 2019 at 3:46 AM Alexander Doroshko notifications@github.com
wrote:

@vsmenon https://github.com/vsmenon, I'm not sure area-intellij is the
right label here.
Without error details the issue doesn't seem to be actionable at all, so
maybe just close?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
dart-lang/sdk#35203 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AkTyU3C1bD_fHXG-kmdl7Jnoo27MAcxxks5vTi7ogaJpZM4YneH2
.

@vsmenon
Copy link
Member Author

vsmenon commented Mar 5, 2019

Ahh, my mistake triaging. I'll move.

@natebosch
Copy link
Member

natebosch commented Mar 5, 2019

When a new version of dart appears eventually my code will not run

This is resolved by updating the dartsdk, getting/updating dependencies and rebuilding.

This is very unclear to me - what action did you take that triggered the error? My initial assumption was that the action was updating the Dart sdk, which triggered a build failure - but that wouldn't make sense if updating the SDK is part of the solution steps...

It seems to me I should still be able to run with the old system.

The only time you should need to update the SDK is if you are using new features only found in the new SDK. If your code, and the versions of dependencies you're using, worked with the old SDK they should continue to work. Upgrading the SDK within major versions also should not trigger build failures except in remote edge cases. Upgrading from Dart 1.x to Dart 2.x is expected to cause failures which require changes in your code.

If not, there should at least be a message that a dartsdk update is required.

This leads me to think the issue is instead that you updated some packages and things failed until the SDK was updated? This is expected only if the package maintainers are doing something wrong - for example if they use a new feature from Dart 2.2 but do not indicate the requirement in their pubspec (an unfortunately common mistake, even the Dart team does this from time to time).

Unfortunately, I did not save the error.

Without a specific error it's very unlikely we'll be able to investigate.

I'm afraid this issue is not actionable for us. If you can give us a specific reproduction case where updating the Dart SDK within a major version (for example 2.0 to 2.1) causes the build to fail we can investigate. Otherwise if you can give a specific reproduction case where updating a dependency required an update to your locally installed SDK we can help you track down the mistake that was made.

@drpond1
Copy link

drpond1 commented Mar 6, 2019 via email

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

No branches or pull requests

3 participants