Skip to content

Conversation

@Abhishek01039
Copy link
Contributor

Part of #71511

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 24, 2021
@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 Hixie on the #hackers channel in Chat.

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.

@google-cla google-cla bot added the cla: yes label Apr 24, 2021
@Abhishek01039
Copy link
Contributor Author

Abhishek01039 commented Apr 24, 2021

image

Do we need this test when we are migrating this to null safety @jmagman ?
packages/flutter_tools/test/general.shard/base/build_test.dart

@Abhishek01039 Abhishek01039 changed the title Migrate build to null safety [WIP] Migrate build to null safety Apr 24, 2021
@Abhishek01039 Abhishek01039 marked this pull request as draft April 24, 2021 04:10
@Abhishek01039
Copy link
Contributor Author

We will migrate this when packages/flutter_tools/lib/src/artifacts.dart will be migrated to null safety

@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

For more guidance, visit Writing a golden file test for package:flutter.

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

@jmagman
Copy link
Member

jmagman commented Apr 26, 2021

@Abhishek01039 all imported libraries need to be migrated before this can be migrated. This is stuck behind artifacts and #80875. I didn't spot any other libraries that could be migrated until that one is done.
Also, you should make sure at a minimum you don't have analyzer warnings before you put these out for review. 🙂
https://github.com/flutter/flutter/pull/81106/checks?check_run_id=2425037280

   info • The library 'package:flutter_tools/src/artifacts.dart' is legacy, and should not be imported into a null safe library • packages/flutter_tools/lib/src/base/build.dart:6:8 • import_of_legacy_library_into_null_safe

@Abhishek01039
Copy link
Contributor Author

Abhishek01039 commented Apr 27, 2021

I am also waiting for artifacts will migrate to null safety. @jmagman
That's why I marked this PR as WIP

@Abhishek01039
Copy link
Contributor Author

Hello @jonahwilliams
When you will migrate packages/flutter_tools/lib/src/artifacts.dart to null safety
then mark this PR as ready
thanks

@jmagman
Copy link
Member

jmagman commented May 21, 2021

@Abhishek01039 artifacts has been migrated to null safety, you can rebase on top of tree.

@jmagman
Copy link
Member

jmagman commented May 22, 2021

Also please migrate build_test at the same time.

@Abhishek01039 Abhishek01039 marked this pull request as ready for review May 22, 2021 03:47
@Abhishek01039 Abhishek01039 changed the title [WIP] Migrate build to null safety Migrate build to null safety May 22, 2021
@jmagman
Copy link
Member

jmagman commented May 22, 2021

Lots of failing tests

02:16 +820 ~3 -1: test/general.shard/build_system/targets/common_test.dart: AotElfProfile Produces correct output directory [E]                                                                        
  NoSuchMethodError: The getter 'isNotEmpty' was called on null.
  Receiver: null
  Tried calling: isNotEmpty
  dart:core                                                          Object.noSuchMethod
  package:flutter_tools/src/base/build.dart 185:54                   AOTSnapshotter.build

@Abhishek01039
Copy link
Contributor Author

CI getting an error in project_test.dart file which is unrelated to this PR I think.
I am getting this when I am trying to run this test locally

Failed to load "test/general.shard/project_test.dart": Directory listing failed, path = '/Users/abhishek/Desktop/open_source/flutter/bin/cache/artifacts/gradle_wrapper/' (OS Error: No such file or directory, errno = 2)
dart:io                                                      _Directory.listSync
2
ForwardingDirectory.listSync
package:file/…/forwarding/forwarding_directory.dart:43
transfer
test/general.shard/project_test.dart:853
_testInMemory
test/general.shard/project_test.dart:790
main.<fn>.<fn>
test/general.shard/project_test.dart:35
package:test_api                                             group
main.<fn>
test/general.shard/project_test.dart:34
package:test_api                                             group
main
test/general.shard/project_test.dart:33
2

✖ loading test/general.shard/project_test.dart
Exited (1)

@jonahwilliams
Copy link
Contributor

CI is green right now so if the test is failing is because of your changes unfortunately

@jmagman
Copy link
Member

jmagman commented May 24, 2021

CI getting an error in project_test.dart file which is unrelated to this PR I think.

Filed #83275. Run flutter build apk once to get the required cached artifacts downloaded. In any case you should still be able to see the other failures locally.

@jmagman
Copy link
Member

jmagman commented May 26, 2021

This was blocking the next clump of migrations, I have a version in #83381.

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

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants