Git Product home page Git Product logo

Comments (4)

Canop avatar Canop commented on June 9, 2024 1

What bacon does when you call it with --features is basically adding the argument at the end of the job command arguments.

Here's the default definition of the test job:

[jobs.test]
command = [
    "cargo", "test", "--color", "always",
    "--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
]

The -- prevents the --features from being given to the the cargo test command.

A workaround is to just edit your bacon.toml file to remove the second line of this command, like this:

[jobs.test]
command = [
    "cargo", "test", "--color", "always",
]

I should probably detect in bacon when there's a -- and insert the --features arguments before.

from bacon.

Canop avatar Canop commented on June 9, 2024 1

Should be fixed now

from bacon.

Canop avatar Canop commented on June 9, 2024 1

(released in 2.15)

from bacon.

nc7s avatar nc7s commented on June 9, 2024

Thanks for the advice, it worked ;)

I see that the second line came from #124, cargo # 1983 being the main obstacle for a more elegant solution.

In a general sense, adding -- to job commands, especially to default ones, feels like a bad choice: you don't know when that's needed, and "fixing" this one occasion means a full blown config file (speaking of that, maybe consider merging config with defaults rather than replacing?). If such arguments is absolutely necessary, maybe introduce a new field? Something like passthru_args (since they are "passed through to" artifacts).

Edit: after second thought, passthru_args doesn't work because if it exists a -- will be added by bacon, conflicting with user supplied -- on command line. There still needs to be a detecting mechanism.

from bacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.