smaug icon indicating copy to clipboard operation
smaug copied to clipboard

Projects created through smaug should be automatically initialized.

Open DSchaedler opened this issue 4 years ago • 2 comments
trafficstars

commands fail if smaug.toml is missing, and it is never explained that projects created with smaug need to be initialized as well.

DSchaedler avatar Jul 16 '21 20:07 DSchaedler

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 run

    Couldn't load Smaug configuration.

  • smaug add $pkg

    Could not find Smaug.toml at $cwd/Smaug.toml

  • smaug config

    Could not find Smaug.toml.

I assume that the case where this could cause confusion would be:

  1. As a first-time Smaug user, after installing smaug on a machine
  2. I navigate to an existing game project directory and attempt to run a subcommand, such as (typically) smaug run
  3. I expect the game to start, as with ./dragonruby, but instead the error Couldn't load Smaug configuration causes me to think that smaug is not installed correctly on my system, and does not indicate that I should run smaug init in 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=1 environment variable to display a backtrace

We should find a way to make this workflow more clear to the user.

logankoester avatar Jan 31 '22 04:01 logankoester

It looks like this is due to the mygame/app nesting in projects unzipped from the drgtk distributable rather than generated by smaug new.

logankoester avatar Jan 31 '22 05:01 logankoester