Skip to content

Conversation

Pebkac03
Copy link
Contributor

@Pebkac03 Pebkac03 commented Dec 14, 2024

Checks if app name is snake_case when running: stacked create app. Fixes Stacked-Org/stacked#1081.

  1. If app name is snake_case behaviour is unchanged.
  2. If app name is not snake_case then user is prompted with <originalAppName> is not snake_case as required by dart, did you mean <appName?> [Y/N]. If they answer yes then the app name will be changed, if they answer no then the program will throw and exit with the message: error: project name not snake_case.

@Pebkac03
Copy link
Contributor Author

Marked as draft. Want to validate all rules for valid Dart app names as well as make the code cleaner.

@KickNext
Copy link

KickNext commented Jan 30, 2025

If use stacked create app . create started in current path, but fail with app name: . in current version. Should this be excluded or used as the name of the parent folder? This can be taken into account in this fix.

@Pebkac03
Copy link
Contributor Author

Pebkac03 commented Jan 30, 2025

@nikitiser do you mean the version of this PR or the current version of Stacked? If you found an issue you feel this resolves please file an issue referencing this PR.

If you mean this PR, could you please clarify?

@Pebkac03
Copy link
Contributor Author

If use stacked create app . create started in current path, but fail with app name: . in current version. Should this be excluded or used as the name of the parent folder? This can be taken into account in this fix.

Thanks for the clarification, should be fairly simple to implement. I'll add it to this PR tomorrow and we can decide to either keep it or split it out before merging.

@Pebkac03
Copy link
Contributor Author

Oh, @nikitiser. A question, would you expect it to only work in an empty folder or one with stuff already added. The latter would be a lot bigger of a task and might be better implemented as a new stacked init command.

@KickNext
Copy link

@Pebkac03 I meant in an empty folder. If it is not empty, there should probably be an error for stacked create app . command.

@Pebkac03
Copy link
Contributor Author

Alright, will add an error for that case as well. Thanks for the hasty reply!

@Pebkac03
Copy link
Contributor Author

Pebkac03 commented Feb 4, 2025

Sorry for the late reply but when digging deeper I found a flaw in the logging. The CLI currently only logs process.stdout and not process.stderr when running commands. In short, it logs info to the terminal but not error messages. I have a working implementation not commited yet but since it's a bigger change affecting all commands it needs more discussion and work.

Will commit when i can so anyone can look through it.

@Pebkac03
Copy link
Contributor Author

Closing this in favour of #57. Will look into adding stacked create app . @nikitiser

@Pebkac03 Pebkac03 closed this Feb 10, 2025
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.

[bug]: app creation do not create android iOS and other code if name contains upper case letter
2 participants