Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: endless_runner template #3

Merged
merged 14 commits into from
Nov 9, 2023
Merged

Conversation

spydon
Copy link
Contributor

@spydon spydon commented Nov 7, 2023

Adds the Endless Runner template to the repository.

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 the Flutter Style Guide recently, and have followed its advice.
  • 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.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@domesticmouse domesticmouse left a comment

Choose a reason for hiding this comment

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

LGTM once @filiph LGTM's

@domesticmouse
Copy link
Contributor

@filiph I'd suggest landing this PR before #2, just so that the CI has something to, you know, CI.

Copy link
Contributor

@filiph filiph left a comment

Choose a reason for hiding this comment

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

LGTM with a couple of suggestions.

After discussion with @domesticmouse, I decided to include platform subdirectories (I'm including android/, ios/ and web/). It does have its advantages, plus it looks like the CI is currently not set up to create these subdirectories on its own.

templates/endless_runner/README.md Outdated Show resolved Hide resolved
templates/endless_runner/README.md Outdated Show resolved Hide resolved
templates/endless_runner/README.md Outdated Show resolved Hide resolved
templates/endless_runner/pubspec.yaml Outdated Show resolved Hide resolved
@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

LGTM with a couple of suggestions.

Thanks for the fixes!

It does have its advantages, plus it looks like the CI is currently not set up to create these subdirectories on its own.

What are the advantages of this? From what I have seen previously it usually just becomes more maintenance work to include the platform directories, since we don't do any changes in there and since they change between Flutter versions you want the users to have the latest platform directories created by flutter create, especially cumbersome when it comes to iOS and MacOS.

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

@domesticmouse I see that the CI is being skipped and I'm not sure what I can do with this. Please advise.

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

Oh, I just realized that there's no test in the template. Do you think you could add a simple smoke test, @spydon? It can be something similar to what's in basic or card. We want to ensure that the projects not only analyze well, but also run. It only catches the most egregious problems, but even that is something.

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

Oh, I just realized that there's no test in the template. Do you think you could add a simple smoke test, @spydon? It can be something similar to what's in basic or card. We want to ensure that the projects not only analyze well, but also run. It only catches the most egregious problems, but even that is something.

Ah yes, I had that on my todo-list, but forgot about it!

@domesticmouse
Copy link
Contributor

@filiph Ahh look, we now have CI on this PR, progress!

@domesticmouse
Copy link
Contributor

Added templates/endless_runner to CI config, so this PR becomes actually self testing =)

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

Hi @spydon,

There are some analyzer problems:

   info • The imported package 'logging' isn't a dependency of the importing package •
          lib/audio/audio_controller.dart:8:8 • depend_on_referenced_packages
warning • Unused import: 'package:flame/events.dart' • lib/flame_game/components/player.dart:3:8 •
       unused_import
   info • The imported package 'logging' isn't a dependency of the importing package •
          lib/settings/settings.dart:6:8 • depend_on_referenced_packages

NVM, that was an easy fix.

@domesticmouse
Copy link
Contributor

Hi @spydon,

There are some analyzer problems:

   info • The imported package 'logging' isn't a dependency of the importing package •
          lib/audio/audio_controller.dart:8:8 • depend_on_referenced_packages
warning • Unused import: 'package:flame/events.dart' • lib/flame_game/components/player.dart:3:8 •
       unused_import
   info • The imported package 'logging' isn't a dependency of the importing package •
          lib/settings/settings.dart:6:8 • depend_on_referenced_packages

NVM, that was an easy fix.

@filiph I'm guessing you are going to add a fix to this PR for the above issues?

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

@filiph I'm guessing you are going to add a fix to this PR for the above issues?

I thought it would be automatic but it turns out to be a pull request on @spydon's repo. ¯\_(ツ)_/¯
spydon#1

@domesticmouse
Copy link
Contributor

@filiph I'm guessing you are going to add a fix to this PR for the above issues?

I thought it would be automatic but it turns out to be a pull request on @spydon's repo. ¯_(ツ)_/¯ spydon#1

hold my beer...

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

I know this is not the place to ask, but... how? How did you do this? Are you using the gh CLI tool?

@domesticmouse
Copy link
Contributor

I know this is not the place to ask, but... how? How did you do this? Are you using the gh CLI tool?

I'm using the GitHub Desktop for mac to check out the repos, and my VSCode is logged into GitHub. Between all of the above it just worked ^(TM)

@domesticmouse
Copy link
Contributor

Argh, this one we need to fix:

info - lib/main.dart:55:15 - 'useMaterial3' is deprecated and shouldn't be used. Use a ThemeData constructor (.from, .light, or .dark) instead. These constructors all have a useMaterial3 argument, and they set appropriate default values based on its value. See the useMaterial3 API documentation for full details. This feature was deprecated after v3.13.0-0.2.pre. Try replacing the use of the deprecated member with the replacement. - deprecated_member_use

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

I know this is not the place to ask, but... how? How did you do this? Are you using the gh CLI tool?

You don't need any special tool for that, as long as the PR owner has "Allow edits and access to secrets by maintainers" the maintainer can just check out the same branch as the PR owner and push directly to that one. It makes it simpler with the gh tool though, since you don't have to fiddle with remotes.

@domesticmouse
Copy link
Contributor

@spydon it looks like your flutterNesTheme is not compliant with Flutter 3.16 beta. Can you go to flutter channel beta and figure out a fix? Alternatively, we can drop useMaterial3: true because I think that becomes default in Flutter 3.16. I think.

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

@spydon it looks like your flutterNesTheme is not compliant with Flutter 3.16 beta. Can you go to flutter channel beta and figure out a fix? Alternatively, we can drop useMaterial3: true because I think that becomes default in Flutter 3.16. I think.

When is 3.16 to be released? If it is soon I suggest we just drop it.

@domesticmouse
Copy link
Contributor

When is 3.16 to be released? If it is soon I suggest we just drop it.

About the same time as this repo goes live, give or take.

@domesticmouse
Copy link
Contributor

@filiph please feel free to land when you are happy. I'm going to bed soon =)

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

Oh, I just realized that there's no test in the template. Do you think you could add a simple smoke test, @spydon? It can be something similar to what's in basic or card. We want to ensure that the projects not only analyze well, but also run. It only catches the most egregious problems, but even that is something.

Added two simple smoke tests in e3ab251

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

@spydon Looks like the flame test times out after 30seconds.

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

@spydon Looks like the flame test times out after 30seconds.

I wonder what is happening here, it works fine in the IDE (Android Studio), but in the terminal it times out at await game.ready();...

@filiph
Copy link
Contributor

filiph commented Nov 8, 2023

I've never seen this before. If you can't find a solution till tomorrow midday, I suggest you remove that Flame test for now so we can land this.

@spydon
Copy link
Contributor Author

spydon commented Nov 8, 2023

I've never seen this before. If you can't find a solution till tomorrow midday, I suggest you remove that Flame test for now so we can land this.

There should be a work-around in place now.

@domesticmouse
Copy link
Contributor

Landing on CI green for stable and beta for ubuntu-latest and windows-latest. I don't see anything that should trigger in macos-latest, and those tests always draaaag.

@domesticmouse domesticmouse merged commit 6b401a5 into flutter:main Nov 9, 2023
7 checks 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.

3 participants