atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.76k stars 564 forks source link

[Bug]: cargo-binstall falls back to installing from source #2111

Closed senekor closed 4 months ago

senekor commented 4 months ago

What did you expect to happen?

cargo-binstall should install the prebuilt binaries from the GitHub releases page.

What happened?

It fell back to installing from source (which itself failed (because of atuin-daemon's protobuf))

Atuin doctor output

atuin:
  version: 18.2.0
  sync: null
shell:
  name: fish
  default: unknown
  plugins:
  - atuin
system:
  os: Fedora Linux
  arch: x86_64
  version: '40'
  disks:
  - name: /dev/mapper/luks-72cdd264-01e0-4bf2-a721-44c9ccc5c1f6
    filesystem: btrfs
  - name: /dev/mapper/luks-72cdd264-01e0-4bf2-a721-44c9ccc5c1f6
    filesystem: btrfs
  - name: /dev/nvme0n1p2
    filesystem: ext4
  - name: /dev/nvme0n1p1
    filesystem: vfat

Code of Conduct

ellie commented 4 months ago

Edit: looks like there's some metadata we can add to help it out, I'll try that

senekor commented 4 months ago

I have played around with cargo-dist myself a while ago and its output was discovered by cargo-binstall without any specific setup for that on my part. So I'm pretty sure there's just some configuration nob that needs to be turned a little for this to work.

senekor commented 4 months ago

What is your release process to crates.io? It seems the generated Cargo.toml on crates.io contains information which specifically instructs cargo-binstall to look for binaries with the version tag in its name: https://docs.rs/crate/atuin/latest/source/Cargo.toml (section [package.metadata.binstall])

senekor commented 4 months ago

Here is cargo-binstall's documentation of that metadata section:

https://github.com/cargo-bins/cargo-binstall/blob/main/SUPPORT.md

It recommends only to add this metadata if the defaults don't work.

I would need to know how you release to crates.io to figure out where this metadata comes from - it's not in the source Cargo.toml.

Please reopen the issue, this is clearly a misconfiguration, nothing wrong with cargo-binstall. I'm happy to help getting this fixed.

ellie commented 4 months ago

Sorry about that! I totally missed that the atuin crate in the workspace had some binstall config 🤦‍♀️