Skip to content

Conversation

@runarheggset
Copy link
Contributor

@runarheggset runarheggset commented May 25, 2024

After upgrading flutter to the latest version (3.22.1), I encountered an error when building with --split-per-abi:

[   +1 ms] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/home/runar/snap/flutter/common/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1182
[        ] * What went wrong:
[        ] A problem occurred evaluating root project 'android'.
[        ] > A problem occurred configuring project ':app'.
[        ]    > org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'.
Try 'java.lang.Integer' instead

This PR changes the type used from ìnt to Integer which is what's used in the ABI_VERSION map.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 25, 2024
@runarheggset runarheggset marked this pull request as ready for review May 25, 2024 15:42
@runarheggset runarheggset changed the title Use correct type for abi version Use correct type for abi version code May 25, 2024
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@christopherfujino
Copy link
Contributor

@reidbaker as a side note, are we not linting java in the framework? or do our lint rules not catch this implicit cast from a boxed Integer to unboxed (non-nullable) int?

@andrewkolos andrewkolos requested a review from a team May 30, 2024 20:33
@andrewkolos
Copy link
Contributor

This change seems reasonable to me at first glance, but I don't know anything about --split-per-abi and any implications (if any) this change might have. Adding android-reviewers as a reviewer.

@reidbaker
Copy link
Contributor

reidbaker commented May 30, 2024

We do Lint. It is likely that what we lint on is not the right set.
@gmackall do you remember offhand where that build.gradle lives with the << lint options

@reidbaker
Copy link
Contributor

I was on my phone yesterday evening. This is groovy code and unfortunately we do not lint groovy code.

@andrewkolos andrewkolos added the autosubmit Merge PR when tree becomes green via auto submit App label May 31, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 31, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented May 31, 2024

auto label is removed for flutter/flutter/149087, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label May 31, 2024
@auto-submit auto-submit bot merged commit b7169ed into flutter:master May 31, 2024
@christopherfujino
Copy link
Contributor

I was on my phone yesterday evening. This is groovy code and unfortunately we do not lint groovy code.

Ahh, ok, that makes sense.

victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
After upgrading flutter to the latest version (3.22.1), I encountered an error when building with `--split-per-abi`:

```
[   +1 ms] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/home/runar/snap/flutter/common/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1182
[        ] * What went wrong:
[        ] A problem occurred evaluating root project 'android'.
[        ] > A problem occurred configuring project ':app'.
[        ]    > org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'int'.
Try 'java.lang.Integer' instead
```

This PR changes the type used from `ìnt` to `Integer` which is what's used in the `ABI_VERSION` map.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants