Git Product home page Git Product logo

Comments (6)

that-ambuj avatar that-ambuj commented on June 11, 2024 2

Hi, I also had this issue when specifying --bin option for test. I have an alternate solution that does not require bacon.toml file. The solution is to use an extra -- when specifying options to cargo instead of bacon.

In this case @Hubro would have change only one thing about the command, This would also keep the fix provided by #124 intact.

bacon test -- -- -p my_sub_package

from bacon.

Canop avatar Canop commented on June 11, 2024 1

It works for me.

Can you please give your configuration and/or build a complete reproductible example ?

from bacon.

Hubro avatar Hubro commented on June 11, 2024 1

It works for me.

Can you please give your configuration and/or build a complete reproductible example ?

Sure, here's a minimal example:

https://github.com/Hubro/bacon-issue-134-demo

To reproduce:

  1. cargo test

    Fails, because there's a syntax error in crate dos

  2. cargo test -p uno

    Succeeds, because only crate uno is built

  3. bacon test -- -p uno

    Fails with syntax error from crate dos, just like the command cargo test. It's as if the option -p uno wasn't forwarded at all.

$ bacon --version
bacon 2.8.1

from bacon.

Canop avatar Canop commented on June 11, 2024 1

Ok, it's a consequence of #124

Here's the current "test" job definition:

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

The addition made for #124 was unfortunate here.

As a workaround, you can change this job definition to

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

To do that, run bacon --init then edit the bacon.toml file.

(don't close the issue)

from bacon.

Canop avatar Canop commented on June 11, 2024

Right now I'm tempted to solve the problem with just some comment in the bacon.toml file, and maybe the website

from bacon.

wmmc88 avatar wmmc88 commented on June 11, 2024

Hi, I also had this issue when specifying --bin option for test. I have an alternate solution that does not require bacon.toml file. The solution is to use an extra -- when specifying options to cargo instead of bacon.

In this case @Hubro would have change only one thing about the command, This would also keep the fix provided by #124 intact.

bacon test -- -- -p my_sub_package

I think this work around may not work anymore. tested on bacon 2.13.0. had to bacon --init and remove the "--", "--color", "always", # see https://github.com/Canop/bacon/issues/124 line

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.