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

[bug]: Stacked CLI #47 appears to have broken line length formatting #1120

Open
CordMemescape opened this issue Aug 20, 2024 · 4 comments
Open
Labels

Comments

@CordMemescape
Copy link

Describe the bug

After updating to stacked_cli 1.13.1, line_length variable in stacked.json appears to be ignored. Files auto-generated by Stacked are being formatted with a default line length of 80.

It appears that the PR #46 and merge #47 in the stacked_cli project have undone this behaviour that was once working.

What operating system do you use?

macOS

Information about the installed tooling

[✓] Flutter (Channel stable, 3.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-GB)
    • Flutter version 3.24.0 on channel stable at /Users/cord.schneider/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (3 weeks ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/cord.schneider/Library/Android/sdk
    • Platform android-35, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.92.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (4 available)
    • slothlet's iPhone (mobile)      • 00008130-000968160C38001C • ios            • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 127.0.6533.120

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Steps to reproduce the issue

  1. Create a stacked project using pre-1.13.1 stacked_cli
  2. Set line_length to 150 in stacked.json
  3. Run stacked create view layoutOne --template=empty in an existing project
  4. Review line length of generated files
  5. Update to 1.13.1 stacked_cli
  6. Run stacked create view LayoutTwo --template=empty in an existing project
  7. Review line length of generated files

Expected behavior

Expected the line length defined in stacked.json to be honoured and all generated files created with stacked_cli 1.13.1 to be correct.

Screenshots

No response

Additional Context

No response

@CordMemescape
Copy link
Author

CordMemescape commented Aug 20, 2024

Note that the hotlinks to #46 and #47 are incorrect as Github has referenced theme for stacked rather than stacked_cli. Unfortunately it is not possible to create an issue in the stacked_cli project.

The links that you actually want are:

Stacked-Org/cli#46
Stacked-Org/cli#47

@CordMemescape
Copy link
Author

Also note, this appears to be happening for stacked create view commands. I've run stacked generate and it behaves as expected.

@FilledStacks
Copy link
Contributor

Thanks Cord. Will add to the list of fixes

@FilledStacks FilledStacks added p2 Second highest Priority p3 and removed p2 Second highest Priority labels Sep 4, 2024
@FilledStacks
Copy link
Contributor

I think we can pass in the line length or set it in the config, we probably didn't update the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants