smaug
smaug copied to clipboard
Projects created through smaug should be automatically initialized.
commands fail if smaug.toml is missing, and it is never explained that projects created with smaug need to be initialized as well.
I just tried a few commands in an empty directory and for the most part I found the resulting output to be clear enough. Examples:
smaug runCouldn't load Smaug configuration.
smaug add $pkgCould not find Smaug.toml at $cwd/Smaug.toml
smaug configCould not find Smaug.toml.
I assume that the case where this could cause confusion would be:
- As a first-time Smaug user, after installing smaug on a machine
- I navigate to an existing game project directory and attempt to run a subcommand, such as (typically)
smaug run - I expect the game to start, as with
./dragonruby, but instead the errorCouldn't load Smaug configurationcauses me to think that smaug is not installed correctly on my system, and does not indicate that I should runsmaug initin this directory before proceeding.
Additionally, the smaug init command may be broken?
I just tried smaug init in a freshly unzipped drgtk directory, which created a Smaug.toml file as expected. Next, I ran smaug run which responded with the following error message:
thread 'main' panicked at 'Could not create canonical path: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cli/src/commands/run.rs:68:51 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace
We should find a way to make this workflow more clear to the user.
It looks like this is due to the mygame/app nesting in projects unzipped from the drgtk distributable rather than generated by smaug new.