Ambient icon indicating copy to clipboard operation
Ambient copied to clipboard

`ambient new` in workspace auto-builds, throws error

Open droqen opened this issue 2 years ago • 1 comments

PS C:\Users\hi\Repos\Ambient\guest\rust\alex> ambient new alex2
[2023-09-28T12:48:09Z INFO  ambient::cli::package::new] Package "alex2" created; doing first build
[2023-09-28T12:48:09Z INFO  ambient_build] Building package "alex2" (g7kw4liobad6qc5qmrdwnqcx45aycix2)
Error: Failed to create package

Caused by:
    0: Failed to build Rust in "C:\\Users\\hi\\Repos\\Ambient\\guest\\rust\\alex\\alex2\\build\\g7kw4liobad6qc5qmrdwnqcx45aycix2"
    1: Failed to compile
       stderr:
       error: current package believes it's in a workspace when it's not[..]

Not a big deal but confusing, especially the message "Error: Failed to create package", as a package actually was created successfully in this case.

Possible solutions

  • Change that message to something more true, e.g. "Error: Failed to build package"
  • Ambient new should notice if I'm in a workspace, and either warn me, or fix it for me
  • Make it so a failed build actually deletes the package so that the message "Failed to create package" is true?

droqen avatar Sep 28 '23 16:09 droqen

p.s. @philpax Is "bad error message" something that fits into the "documentation" label?

droqen avatar Sep 28 '23 16:09 droqen