Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Allow specifying features for the installed crates #1

Open
Razican opened this issue Apr 2, 2020 · 2 comments
Open

Allow specifying features for the installed crates #1

Razican opened this issue Apr 2, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Razican
Copy link

Razican commented Apr 2, 2020

Motivation

I currently use this line in my workflows:

cargo install --features postgres --no-default-features diesel_cli

This action currently doesn't allow specifying features (or removing default features) of a crate, and that would be nice.

Workflow example

on: [push]

name: build

jobs:
  check:
    name: Rust project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/[email protected]
        with:
          crate: diesel_cli
          version: latest
          features: postgres
          default-features: false
      - run: diesel migration run

Additional context

If we want to also support cache for this, we would need to add cache for different feature matrices, which might prove difficult.

@Razican Razican added the enhancement New feature or request label Apr 2, 2020
@svartalf
Copy link
Member

svartalf commented Apr 3, 2020

Hey, @Razican!

It was intentional not to support any additional arguments for cargo install command for the first public version; most of the cargo plugins and other tools do not use cargo features, so we can speed up installation for them at least.

diesel-cli and other binary crates, which are requiring features to be set, are definitely a great thing to add into the tools cache, but you are correct about the cache bloating, though, so this thing needs to be thinked about first.

@sffc
Copy link

sffc commented Oct 25, 2022

wasmer-cli is another example of a crate that requires features to enable the binary target.

My team's crate, icu_datagen, is another.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants