Skip to content

Conversation

@jonahwilliams
Copy link
Contributor

Description

flutter tests compiled to JavaScript will not be able to safely invoke Platform.isWindows/isLinux/isMacOS in skip fields since this dart:io method has no implementation currently in the web SDK. Even if we added an implementation, it would likely not capture the spirit of these particular skips - we don't want to conflate skipping something on flutter tester on Windows with skipping something running in a browser on Windows.

To avoid the lint "don't define a class with only static members" I made these top level getters, though I am open to other approaches.

Related Issues

#33349

@goderbauer goderbauer added the framework flutter/packages/flutter repository. See also f: labels. label May 28, 2019
@gspencergoog
Copy link
Contributor

It would be nice if these were const values instead of accessors, a la dart-lang/sdk#35705. Then the code could be more completely optimized by the compiler.

But at least these are accessors and not functions so that they can be swapped out for const values in the future.

@jonahwilliams
Copy link
Contributor Author

We could definitely do this ourselves once a) the const evaluation update lands, allowing us to provide defines to non-AOT builds b) we produce different bundles/snapshots per architecture

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Looks like you'll need to merge with master.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks mentioned this pull request Jun 3, 2019
9 tasks
@jonahwilliams jonahwilliams merged commit d92b3b4 into flutter:master Jun 3, 2019
@jonahwilliams jonahwilliams deleted the add_test_platform branch June 3, 2019 17:55
jonahwilliams pushed a commit that referenced this pull request Jun 3, 2019
@jonahwilliams jonahwilliams restored the add_test_platform branch June 3, 2019 18:08
jonahwilliams pushed a commit that referenced this pull request Jun 3, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants