SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Include project language in project config

Open bfops opened this issue 1 year ago • 0 comments

Currently, spacetime publish detects language by searching for Cargo.toml, and assuming the absence means we’re in a C# project. This is bad, because it means if you run spacetime publish in a directory that isn’t either a C# or Rust project, we’ll try to compile it as C#, which will fail with a bad error message.

One way to avoid this is to require that modules include a Spacetime config file (.spacetime.toml or spacetime.toml), and include the project language in that config file.

For good DX, this will require automatically creating a config file in spacetime init, and a good error message from spacetime publish if the config file is not found. The error message should describe how to create a config file, ideally including a snippet that the user can paste into their shell to create the config file.

bfops avatar Nov 08 '24 23:11 bfops