Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: reexport lost fuels::tx::Output under fuels::types::output::Output #961

Merged
merged 2 commits into from
May 18, 2023

Conversation

segfault-magnet
Copy link
Contributor

We've recently lost our fuels::tx::Output reexport of the fuel_tx::Output, this PR introduces it back but under a less surprising location (fuels::types::output::Output to mimic the already existing fuels::types::input::Input)

Although I'm not a fan of the output::Output verbosity, I decided to leave it so that it doesn't surprise users.

We should probably reexport the types under fuels::types::{Input, Output} rather than needlessly mention the internal mod structure.

Checklist

  • I have linked to any relevant issues.
  • I have updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@segfault-magnet segfault-magnet added the bug Something isn't working label May 12, 2023
@segfault-magnet segfault-magnet requested a review from a team May 12, 2023 19:55
@segfault-magnet segfault-magnet self-assigned this May 12, 2023
@segfault-magnet segfault-magnet requested a review from iqdecay as a code owner May 12, 2023 19:55
Copy link
Contributor

@iqdecay iqdecay left a comment

Choose a reason for hiding this comment

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

Why not fuels::types::{Input, Output} directly? It would be released with the big changes from #950 anyway so it would make sense IMO.

@segfault-magnet
Copy link
Contributor Author

Why not fuels::types::{Input, Output} directly? It would be released with the big changes from #950 anyway so it would make sense IMO.

I'd love to, but then we'd have to also do all of these as well:

pub mod bech32;
pub mod block;
pub mod chain_info;
pub mod coin;
pub mod constants;
pub mod enum_variants;
pub mod errors;
pub mod input;
pub mod message;
pub mod message_proof;
pub mod node_info;
pub mod offsets;
pub mod param_types;
pub mod resource;
pub mod traits;
pub mod transaction;
pub mod transaction_builders;
pub mod transaction_response;
pub mod unresolved_bytes;

make them private mods and reexport their contents publicly.

So I wanted to suggest the idea here before doing it. If the @FuelLabs/sdk-rust is ok with it lets do it.

@iqdecay
Copy link
Contributor

iqdecay commented May 13, 2023

Ah yes no ok this is much larger haha, warrants a discussion

@hal3e
Copy link
Contributor

hal3e commented May 14, 2023

Why not fuels::types::{Input, Output} directly? It would be released with the big changes from #950 anyway so it would make sense IMO.

I'd love to, but then we'd have to also do all of these as well:

pub mod bech32;
pub mod block;
pub mod chain_info;
pub mod coin;
pub mod constants;
pub mod enum_variants;
pub mod errors;
pub mod input;
pub mod message;
pub mod message_proof;
pub mod node_info;
pub mod offsets;
pub mod param_types;
pub mod resource;
pub mod traits;
pub mod transaction;
pub mod transaction_builders;
pub mod transaction_response;
pub mod unresolved_bytes;

make them private mods and reexport their contents publicly.

So I wanted to suggest the idea here before doing it. If the @FuelLabs/sdk-rust is ok with it lets do it.

I like this idea. I suggest we do it in #956 as I am already introducing breaking changes there with re-exports.

@segfault-magnet segfault-magnet enabled auto-merge (squash) May 18, 2023 13:26
@segfault-magnet segfault-magnet merged commit d697a76 into master May 18, 2023
@segfault-magnet segfault-magnet deleted the segfault-magnet/reintroduce_output_reexport branch May 18, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants