Skip to content

ci: Pin Flutter to the version we use in release#2140

Merged
rajveermalviya merged 6 commits intozulip:mainfrom
rajveermalviya:pr-git
Feb 13, 2026
Merged

ci: Pin Flutter to the version we use in release#2140
rajveermalviya merged 6 commits intozulip:mainfrom
rajveermalviya:pr-git

Conversation

@rajveermalviya
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks! I ended up sending the immediate fix as #2138, which I'm about to merge. (Ironically it was delayed a bit as I debugged why the script wasn't working… which turned out to be another instance of using --git-dir when -C is needed, for git reset.)

So please rebase these changes atop that, and we can do this as a quick follow-up to clean up some of this logic. Generally it all looks good — just one comment below.

Comment on lines +26 to +31
# shellcheck disable=SC2207 # output has controlled whitespace
parsed=( $(
perl <pubspec.yaml -0ne '
print "$1 $2" if (
/^ sdk: .*\n flutter: '\''>=\S+'\''\s*# ([0-9a-f]{40})$/m)'
) ) || return
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.

This is fairly gnarly-looking logic, and it duplicates some code that's in tools/check . So let's have a prep commit factor that logic out, and then we can re-use it.

The factored-out logic can go as a shell function in tools/lib/git.sh . (Or we could make a separate file like maybe tools/lib/deps.sh , move the existing flutter_tree function there, and put this new function there too.)

@rajveermalviya rajveermalviya force-pushed the pr-git branch 2 times, most recently from 2f22cfd to bbb7351 Compare February 13, 2026 06:29
@rajveermalviya rajveermalviya marked this pull request as ready for review February 13, 2026 06:30
@rajveermalviya
Copy link
Copy Markdown
Member Author

This ready for another review @gnprice. PTAL.

Copy link
Copy Markdown
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks! Generally this all looks good. A couple of nits below, and this will also need rebasing onto current main (atop #2138).

Comment on lines +12 to 15
# shellcheck source=tools/lib/deps.sh
. "${this_dir}"/lib/deps.sh

## CLI PARSING
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.

nit: maintain the double blank line before heading

Comment on lines +18 to +19
pubspec_flutter_version() {
# Parse our Flutter version spec and its commit-ID comment.
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.

nit: this information is now in the doc comment

Suggested change
pubspec_flutter_version() {
# Parse our Flutter version spec and its commit-ID comment.
pubspec_flutter_version() {

Comment on lines +15 to +18
# Output Parameters:
# - flutter_version
# - flutter_commit
pubspec_flutter_version() {
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.

Subtle!

Seems like a fine use of this pattern, though.


flutter_tree=~/flutter

clone_flutter_sdk() {
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.

What's the purpose of moving this script's contents into a function?

I think the fact that the function has the same name as the script (modulo punctuation conventions) is evidence that it's not a useful encapsulation in this case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, I did that to be able to define local output variable for pubspec_flutter_version. Is there another way to do it?

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.

Mmm, I see.

Can you just skip the local definition, though? That statement isn't allowed outside a function, but I think the reason for that is basically that it wouldn't have any real effect anyway.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay removed the local definition.

@rajveermalviya
Copy link
Copy Markdown
Member Author

Thanks for the review @gnprice! Pushed an update, PTAL.

@gnprice
Copy link
Copy Markdown
Member

gnprice commented Feb 13, 2026

Thanks! All looks good except the one subthread at #2140 (comment) .

@rajveermalviya
Copy link
Copy Markdown
Member Author

Thanks! Changes pushed.

@gnprice
Copy link
Copy Markdown
Member

gnprice commented Feb 13, 2026

Thanks! All looks good. Please go ahead and merge once CI passes.

@rajveermalviya rajveermalviya merged commit ae46d7c into zulip:main Feb 13, 2026
1 check 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.

2 participants