FuelLabs / fuels-rs

Fuel Network Rust SDK
https://fuellabs.github.io/fuels-rs
Apache License 2.0
44.35k stars 1.33k forks source link

feat: make `setup_program_test!` macro hygienic #1389

Closed Br1ght0ne closed 1 month ago

Br1ght0ne commented 1 month ago

Close #1376.

Checklist

Br1ght0ne commented 1 month ago

Does it make sense that the std flag activates test_helpers ?

@hal3e Currently the dep:fuels-test-helpers is being enabled solely by the std flag. I decided to plug into the existing setup instead of introducing a new flag. I can see how breaking a test_helpers flag can be too

hal3e commented 1 month ago

Does it make sense that the std flag activates test_helpers ?

@hal3e Currently the dep:fuels-test-helpers is being enabled solely by the std flag. I decided to plug into the existing setup instead of introducing a new flag. I can see how breaking a test_helpers flag can be too

We can leave it as is in this PR but I would add a new feature test_helpers and make it default. std would not activate test_helpers but test_helpers would activate std.

segfault-magnet commented 1 month ago

I'd avoid making test helpers default. It's something that should only be used in tests. Don't want ppl compiling the code for prod.