clockworklabs / clockworklabs/SpacetimeDB

Generate fails in environment without rustup

Open
#1,206 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Running spacetime generate ... in an environment without rustup fails.
When trying to format the autogenerated files, it throws Error: No such file or directory (os error 2), complaining that the rustup binary is misisng here.
In my case, running NixOS, cargo and such are installed via nix.
A few lines above where it tries to install the wasm32-unknown-unknown target it correctly doesn't exit, and just tries to continue anyway.

Ideally it should only fail if rustfmt is missing, not if it fails to isntall rustfmt via rustup.
(Or formatting would simply be skipped on autogenerated files if errors occur, installing rustup components without the user's input does not seem good at all)

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 with crates/cli/src/subcommands/generate/mod.rs around line 500 and reproduce spacetime generate ... in an environment without rustup. Trace the wasm32 target setup and autogenerated-file formatting path. Done means generation no longer fails because rustup is absent, while the issue's stated rustfmt behavior is preserved or clearly handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.