Skip to content

Commit

Permalink
fix(cli): --features and --no-default-features should not be exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 7, 2023
1 parent db89395 commit f285e11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/src/api/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,17 @@ class Builder {

private setFeatures() {
const args = []
if (this.options.allFeatures && this.options.allFeatures) {
throw new Error(
'Cannot specify --all-features and --no-default-features together',
)
}
if (this.options.allFeatures) {
args.push('--all-features')
} else if (this.options.noDefaultFeatures) {
args.push('--no-default-features')
} else if (this.options.features) {
}
if (this.options.features) {
args.push('--features', ...this.options.features)
}

Expand Down

1 comment on commit f285e11

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: f285e11 Previous: db89395 Ratio
noop#napi-rs 82650309 ops/sec (±1.22%) 85648294 ops/sec (±1.62%) 1.04
noop#JavaScript 820929956 ops/sec (±0.07%) 822307365 ops/sec (±0.22%) 1.00
Plus number#napi-rs 24698298 ops/sec (±0.44%) 24025052 ops/sec (±1.5%) 0.97
Plus number#JavaScript 818030519 ops/sec (±0.69%) 821498392 ops/sec (±0.23%) 1.00
Create buffer#napi-rs 660327 ops/sec (±13.49%) 683628 ops/sec (±11.46%) 1.04
Create buffer#JavaScript 3526175 ops/sec (±3.07%) 3975836 ops/sec (±2.4%) 1.13
createArray#createArrayJson 53896 ops/sec (±0.54%) 54968 ops/sec (±0.37%) 1.02
createArray#create array for loop 10215 ops/sec (±0.61%) 10425 ops/sec (±0.52%) 1.02
createArray#create array with serde trait 10388 ops/sec (±1.06%) 10431 ops/sec (±0.34%) 1.00
getArrayFromJs#get array from json string 24285 ops/sec (±0.67%) 23991 ops/sec (±0.61%) 0.99
getArrayFromJs#get array from serde 11870 ops/sec (±1.1%) 11501 ops/sec (±0.38%) 0.97
getArrayFromJs#get array with for loop 16824 ops/sec (±0.32%) 16888 ops/sec (±0.2%) 1.00
Get Set property#Get Set from native#u32 558608 ops/sec (±13.69%) 586624 ops/sec (±11.29%) 1.05
Get Set property#Get Set from JavaScript#u32 546047 ops/sec (±2.56%) 545334 ops/sec (±2.34%) 1.00
Get Set property#Get Set from native#string 534660 ops/sec (±12.61%) 558903 ops/sec (±11.29%) 1.05
Get Set property#Get Set from JavaScript#string 509377 ops/sec (±1.96%) 508857 ops/sec (±1.86%) 1.00
Async task#spawn task 26696 ops/sec (±0.43%) 27306 ops/sec (±0.53%) 1.02
Async task#ThreadSafeFunction 8953 ops/sec (±1.63%) 9454 ops/sec (±1.01%) 1.06
Async task#Tokio future to Promise 31926 ops/sec (±1.11%) 32895 ops/sec (±1.13%) 1.03
Query#query * 100 3866 ops/sec (±0.86%) 3956 ops/sec (±0.65%) 1.02
Query#query * 1 27185 ops/sec (±1.46%) 28188 ops/sec (±1.55%) 1.04

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.