KEMBAR78
Add --profile Option by wx257osn2 · Pull Request #661 · cabinpkg/cabin · GitHub
Skip to content

Conversation

wx257osn2
Copy link
Contributor

This PR adds --profile option to build and run subcommands.

Consideration

cargo has some default profiles, and one of that for developing named dev outputs target/debug/* .
In this PR I named debug for that, but if you mind, it's better to change before merge.

FAQ

  • Q. Why does valid_profile return Result<Option<String>, String> ,
    • instead of Result<core::builder::ninja::build::Mode, String> or something like that?
      • I don't know the plan, but if poac is aspiring to be like cargo , poac will support user-defined profiles.
    • instead of Result<String, String> with return value "debug" if valid_profile(None, false) or valid_profile(None, None) ?
      • To reuse this function to implement clean subcommand. clean needs to recognize unspecified , --profile=debug , and release mode (--profile=release and/or --release). None returned by valid_profile indicates above unspecified .

@wx257osn2 wx257osn2 requested a review from ken-matsui July 24, 2022 01:47
@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #661 (ae058de) into main (ec13052) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #661      +/-   ##
==========================================
+ Coverage   98.16%   98.17%   +0.01%     
==========================================
  Files          52       52              
  Lines        2502     2527      +25     
==========================================
+ Hits         2456     2481      +25     
  Misses         46       46              
Impacted Files Coverage Δ
tests/unit/core/validator.cc 98.64% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec13052...ae058de. Read the comment docs.

Copy link
Member

@ken-matsui ken-matsui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate your PR! I love this feature :)

@ken-matsui ken-matsui merged commit b67aee8 into main Jul 24, 2022
@ken-matsui ken-matsui deleted the profile-option branch July 24, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants