Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support glob patterns in package selection #275

@leighmcculloch

Description

@leighmcculloch

The cargo hack build command does not accept global patterns like *, ? or [].

However the cargo build command does.

For example:

cargo hack build:

$ cargo hack build --package 'test_*'
error: package ID specification `test_*` matched no packages

vs

cargo build:

$ cargo build --package 'test_*'
   Compiling test_workspace_lib v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/workspace_lib)
   Compiling test_errors v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/errors)
   Compiling test_multiimpl v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/multiimpl)
   Compiling test_add_u128 v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/add_u128)
   Compiling test_add_i128 v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/add_i128)
   Compiling test_workspace_contract v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/workspace_contract)
   Compiling test_modular v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/modular)
   Compiling test_events v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/events)
   Compiling test_auth v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/auth)
   Compiling test_empty v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/empty)
   Compiling test_import_contract v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/import_contract)
   Compiling test_fuzz v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/fuzz)
   Compiling test_udt v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/udt)
   Compiling test_empty2 v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/empty2)
   Compiling test_account v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/account)
   Compiling test_contract_data v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/contract_data)
   Compiling test_constructor v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/constructor)
   Compiling test_add_u64 v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/add_u64)
   Compiling test_alloc v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/alloc)
   Compiling test_logging v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/logging)
   Compiling test_invoke_contract v22.0.7 (/Users/leighmcculloch/Code/rs-soroban-sdk/tests/invoke_contract)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.39s

It would be helpful if the hack build command also accepted globals for selecting multiple packages that fit a specific naming convention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: A new feature or an improvement for an existing one

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions