Skip to content

[pub] Log the Dart / Flutter SDK version selected#5748

Merged
jurre merged 8 commits intodependabot:mainfrom
sigurdm:log_flutter_version
Sep 20, 2022
Merged

[pub] Log the Dart / Flutter SDK version selected#5748
jurre merged 8 commits intodependabot:mainfrom
sigurdm:log_flutter_version

Conversation

@sigurdm
Copy link
Copy Markdown
Contributor

@sigurdm sigurdm commented Sep 19, 2022

Fix of #5396

@sigurdm sigurdm requested a review from a team as a code owner September 19, 2022 09:00

parsed = JSON.parse(stdout)
flutter_version = parsed["frameworkVersion"]
dart_version = parsed["dartSdkVersion"].split.first
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
dart_version = parsed["dartSdkVersion"].split.first
dart_version = parsed["dartSdkVersion"]&.split&.first

Should we add this to safe-guard against parsed["dartSdkVersion"] being nil? This would now raise an error if it's nil.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should always have a dart version. I made the check such that the error message will become nicer.

@jurre
Copy link
Copy Markdown
Member

jurre commented Sep 19, 2022

Thanks @sigurdm! I noticed there are a few linter violations that you'll see in the CI output, they should be easy to fix up but lmk if I can help.

I also notice this breaks a (new) end-to-end test:

2022/09/19 09:05:04 [010] POST http://host.docker.internal:40845/update_jobs/cli/record_update_job_error
2022/09/19 09:05:04 type was unexpected: expected update_dependency_list got record_update_job_error

Which hints that this might be causing the job to fail, I left an in-line comment about what could potentially cause an issue here, but I may be off.

@sigurdm
Copy link
Copy Markdown
Contributor Author

sigurdm commented Sep 19, 2022

Now it seems to pass checks. PTAL

@sigurdm sigurdm requested a review from jurre September 19, 2022 14:18
Copy link
Copy Markdown
Member

@jurre jurre left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks @sigurdm!

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.

2 participants