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

fix: dart template should not rely on flutter commands #944

Open
yahu1031 opened this issue Jan 12, 2024 · 6 comments
Open

fix: dart template should not rely on flutter commands #944

yahu1031 opened this issue Jan 12, 2024 · 6 comments
Labels
bug Something isn't working as expected p3 Issues that we currently consider unimportant

Comments

@yahu1031
Copy link

Description
I'm trying to create a cli using very_good_cli, but I noticed that it uses Flutter to get packages. But Why? We can actually use Dart and Flutter according to the project types, right?

Steps To Reproduce

  1. Install cli
  2. create a dart_cli project
  3. Observe the logs

Expected Behavior
Should Ideally, use dart cli to get package dependencies

Verbose Logs

mr.minnu@MrMinnu's-Macbook-Pro ~ % very_good create dart_cli ttd_cli --verbose
Argument information:
  Top level options:
  - verbose: true
  Command: create
    Command options:
    Command sub command: dart_cli
Building generator from brick: very_good_dart_cli ^0.5.1
Validating project name; args: [ttd_cli]
Validating project name; args: [ttd_cli]
✓ Generated 24 file(s) (63ms)
Validating project name; args: [ttd_cli]
Running: flutter with [--version]
stdout:
Flutter 3.18.0-19.0.pre.64 • channel master • https://github.com/flutter/flutter.git
Framework • revision 49edbc7491 (8 days ago) • 2024-01-04 10:26:48 -0800
Engine • revision b81023eb71
Tools • Dart 3.3.0 (build 3.3.0-279.0.dev) • DevTools 2.31.0

stderr:

Running: flutter with [pub, get] ### <------ SEE HERE
⠇ Running "flutter pub get" in ./ttd_cli... (3.8s)stdout: ### <------ SEE HERE
Resolving dependencies...
+ _fe_analyzer_shared 65.0.0
+ analyzer 6.3.0
+ args 2.4.2
+ async 2.11.0
+ boolean_selector 2.1.1
+ build 2.4.1
+ build_config 1.1.1
+ build_daemon 4.0.1
+ build_resolvers 2.4.2
+ build_runner 2.4.8
+ build_runner_core 7.2.11
+ build_verify 3.1.0
+ build_version 2.1.1
+ built_collection 5.1.1
+ built_value 8.8.1
+ checked_yaml 2.0.3
+ cli_completion 0.3.0 (0.4.0 available)
+ code_builder 4.10.0
+ collection 1.18.0
+ convert 3.1.1
+ coverage 1.7.2
+ crypto 3.0.3
+ dart_style 2.3.4
+ equatable 2.0.5
+ ffi 2.1.0
+ file 6.1.4 (7.0.0 available)
+ fixnum 1.1.0
+ frontend_server_client 3.2.0
+ glob 2.1.2
+ graphs 2.3.1
+ http 1.1.2
+ http_multi_server 3.2.1
+ http_parser 4.0.2
+ io 1.0.4
+ js 0.7.0
+ json_annotation 4.8.1
+ logging 1.2.0
+ mason_logger 0.2.11
+ matcher 0.12.16+1
+ meta 1.11.0
+ mime 1.0.4
+ mocktail 1.0.2
+ node_preamble 2.0.2
+ package_config 2.1.0
+ path 1.9.0
+ platform 3.1.4
+ pool 1.5.1
+ process 4.2.4 (5.0.2 available)
+ pub_semver 2.1.4
+ pub_updater 0.3.1 (0.4.0 available)
+ pubspec_parse 1.2.3
+ shelf 1.4.1
+ shelf_packages_handler 3.0.2
+ shelf_static 1.1.2
+ shelf_web_socket 1.0.4
+ source_map_stack_trace 2.1.1
+ source_maps 0.10.12
+ source_span 1.10.0
+ stack_trace 1.11.1
+ stream_channel 2.1.2
+ stream_transform 2.1.0
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test 1.25.1
+ test_api 0.7.0
+ test_core 0.6.0
+ timing 1.0.1
+ typed_data 1.3.2
+ very_good_analysis 5.1.0
+ vm_service 14.0.0
+ watcher 1.1.0
+ web 0.4.2
+ web_socket_channel 2.4.3
+ webkit_inspection_protocol 1.2.1
+ win32 5.2.0
+ yaml 3.1.2
Changed 76 dependencies!
4 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information. ### <------ SEE HERE

stderr:

✓ Running "flutter pub get" in ./ttd_cli (3.9s)
Running: dart with [--version]
stdout:
Dart SDK version: 3.3.0-279.0.dev (dev) (Thu Jan 4 06:34:46 2024 -0800) on "macos_arm64"

stderr:

Running: dart with [fix, --apply]
⠹ Running "dart fix --apply" in ./ttd_cli... (1.8s)stdout:
Computing fixes in ttd_cli...
Applying fixes...

lib/src/command_runner.dart
  directives_ordering - 1 fix

lib/src/commands/update_command.dart
  directives_ordering - 1 fix

test/src/command_runner_test.dart
  directives_ordering - 1 fix

test/src/commands/sample_command_test.dart
  directives_ordering - 1 fix

test/src/commands/update_command_test.dart
  directives_ordering - 1 fix

5 fixes made in 5 files.

stderr:

✓ Running "dart fix --apply" in ./ttd_cli (1.8s)


Created a Very Good Dart CLI application! 🦄
@yahu1031 yahu1031 added the bug Something isn't working as expected label Jan 12, 2024
@alestiago
Copy link
Contributor

alestiago commented Jan 12, 2024

Thanks @yahu1031 for opening this issue!

I was able to reproduce this, I got:

very_good create dart_cli issue
✓ Generated 24 file(s) (68ms)
✓ Running "flutter pub get" in ./issue (3.0s)
✓ Running "dart fix --apply" in ./issue (1.6s)

Created a Very Good Dart CLI application! 🦄

I believe you're correct, only dart pub get should be needed.

@alestiago alestiago moved this to Needs Triage in VGV Open Source 🦄 🧙🌟 Jan 12, 2024
@tomarra tomarra moved this from Needs Triage to Backlog in VGV Open Source 🦄 🧙🌟 Jan 17, 2024
@tomarra tomarra removed the question label Jan 17, 2024
@tomarra tomarra changed the title Question: Why do we need flutter to create dart_cli? fix: dart template should not rely on flutter commands Jan 17, 2024
@yahu1031
Copy link
Author

This is still not fixed 😞 or this is just a hard coded string? @alestiago

mr.minnu@MrMinnu's-Macbook-Pro ~ % very_good create dart_cli sky_cli --verbose
Argument information:
  Top level options:
  - verbose: true
  Command: create
    Command options:
    Command sub command: dart_cli
Building generator from brick: very_good_dart_cli ^0.6.1
Validating project name; args: [sky_cli]
Validating project name; args: [sky_cli]
✓ Generated 24 file(s) (85ms)
Validating project name; args: [sky_cli]
Running: flutter with [--version]
stdout:
Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (3 weeks ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1

stderr:

Running: flutter with [pub, get]
⠹ Running "flutter pub get" in ./sky_cli... (1.8s)stdout:
Resolving dependencies...
+ _fe_analyzer_shared 67.0.0
+ analyzer 6.4.1
+ args 2.5.0
+ async 2.11.0
+ boolean_selector 2.1.1
+ build 2.4.1
+ build_config 1.1.1
+ build_daemon 4.0.1
+ build_resolvers 2.4.2
+ build_runner 2.4.9
+ build_runner_core 7.3.0
+ build_verify 3.1.0
+ build_version 2.1.1
+ built_collection 5.1.1
+ built_value 8.9.2
+ checked_yaml 2.0.3
+ cli_completion 0.5.0
+ code_builder 4.10.0
+ collection 1.18.0
+ convert 3.1.1
+ coverage 1.7.2
+ crypto 3.0.3
+ dart_style 2.3.6
+ equatable 2.0.5
+ ffi 2.1.2
+ file 7.0.0
+ fixnum 1.1.0
+ frontend_server_client 4.0.0
+ glob 2.1.2
+ graphs 2.3.1
+ http 1.2.1
+ http_multi_server 3.2.1
+ http_parser 4.0.2
+ io 1.0.4
+ js 0.7.1
+ json_annotation 4.8.1
+ logging 1.2.0
+ mason_logger 0.2.12
+ matcher 0.12.16+1
+ meta 1.14.0
+ mime 1.0.5
+ mocktail 1.0.3
+ node_preamble 2.0.2
+ package_config 2.1.0
+ path 1.9.0
+ platform 3.1.4
+ pool 1.5.1
+ process 5.0.2
+ pub_semver 2.1.4
+ pub_updater 0.4.0
+ pubspec_parse 1.2.3
+ shelf 1.4.1
+ shelf_packages_handler 3.0.2
+ shelf_static 1.1.2
+ shelf_web_socket 1.0.4
+ source_map_stack_trace 2.1.1
+ source_maps 0.10.12
+ source_span 1.10.0
+ stack_trace 1.11.1
+ stream_channel 2.1.2
+ stream_transform 2.1.0
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test 1.25.3
+ test_api 0.7.1
+ test_core 0.6.1
+ timing 1.0.1
+ typed_data 1.3.2
+ very_good_analysis 5.1.0
+ vm_service 14.2.0
+ watcher 1.1.0
+ web 0.5.1
+ web_socket_channel 2.4.5
+ webkit_inspection_protocol 1.2.1
+ win32 5.4.0
+ yaml 3.1.2
Changed 76 dependencies!

stderr:

✓ Running "flutter pub get" in ./sky_cli (1.8s)
Running: dart with [--version]
stdout:
Dart SDK version: 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "macos_arm64"

stderr:

Running: dart with [fix, --apply]
⠴ Running "dart fix --apply" in ./sky_cli... (2.8s)stdout:
Computing fixes in sky_cli...
Applying fixes...

test/src/command_runner_test.dart
  directives_ordering - 1 fix

test/src/commands/sample_command_test.dart
  directives_ordering - 1 fix

test/src/commands/update_command_test.dart
  directives_ordering - 1 fix

3 fixes made in 3 files.

stderr:

✓ Running "dart fix --apply" in ./sky_cli (2.9s)


Created a Very Good Dart CLI application! 🦄



Thank you for using Very Good Ventures open source tools!
Don't forget to fill out this form to get information on future updates and releases here: 
https://verygood.ventures/open-source/cli/subscribe-latest-tool-updates 

@alestiago
Copy link
Contributor

alestiago commented Apr 15, 2024

Hi @yahu1031 , thanks for reaching out 💙 ! This item is still in our Backlog and although we've been able to reproduce it we haven't yet committed to solving it. Would you be interested in contributing?

@yahu1031
Copy link
Author

Yup sure lemme check what i can do...

@alestiago
Copy link
Contributor

@yahu1031 are you still interested in contributing and solving this issue? I haven't heard any updates from you in a while 🙌

@yahu1031
Copy link
Author

yahu1031 commented Jul 3, 2024

Hey @alestiago, I'm so sorry to abandon this issue. I got piled up with some work. I just opened github today. Luckily you got me 🤣 . I'm sorry I can't do it this time. Hope someone from the team can pick this up.

@tomarra tomarra added the p3 Issues that we currently consider unimportant label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected p3 Issues that we currently consider unimportant
Projects
Status: Backlog
Development

No branches or pull requests

3 participants