clockworklabs / clockworklabs/SpacetimeDB

Include project language in project config

Open
#1,975 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the spacetime init and spacetime publish entry points and how they currently detect project language. Check how .spacetime.toml and spacetime.toml are handled, then define completion as config creation during init and a clear publish error with a shell-pastable creation snippet when config is missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.